我正在尝试使用youtube api V3来验证youtube视频(带有id_video)是否有效/存在.这就是我做的(y2oy7b4SFgE是我测试的视频的ID):
$file_headers = @get_headers('https://www.googleapis.com/youtube/v3/videos?part=id&id=y2oy7b4SFgE&key=ma_clé_api_publique');
//exit(var_dump($file_headers));
if ($file_headers[0] == 'HTTP/1.0 200 OK') {
$resultat = $file_headers[0].'Goood'
} else {
$resultat = $file_headers[0].'PasGoood'
}
Run Code Online (Sandbox Code Playgroud)
但我有一个"代码":403,"消息":"您的API密钥上配置了每IP或每个Referer限制,但请求与这些限制不符.请使用Google Developers Console更新您的API如果允许来自此IP或引用者的请求,则为密钥配置."
当没有参考者时,它运作良好.但是当我放一个,我尝试使用我的网站名称或我的vps服务器的IP,每次它都没有.
尝试构建使用时,ionic run ios -lc我在终端中看到以下错误:
** BUILD FAILED **
The following build commands failed:
Ld build/emulator/xXxXxXx.app/xXxXxXx normal i386
(1 failure)
Error code 65 for command: xcodebuild with args: -xcconfig,/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/cordova/build-debug.xcconfig,-project,xXxXxXx.xcodeproj,ARCHS=i386,-target,xXxXxXx,-configuration,Debug,-sdk,iphonesimulator,build,VALID_ARCHS=i386,CONFIGURATION_BUILD_DIR=/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/build/emulator,SHARED_PRECOMPS_DIR=/Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/build/sharedpch
Error: /Users/xXxXxXx/Projects/xXxXxXx/platforms/ios/cordova/run: Command failed with exit code 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
Run Code Online (Sandbox Code Playgroud)
当我尝试在xCode中构建相同的应用程序时,我看到了错误 linker command failed with exit code 1 (use -v to see invocation)
'autovalidate' 已弃用,不应使用。使用 autoValidateMode 参数提供与自动验证相关的更具体的行为。此功能在 v1.19.0 之后被弃用。. 尝试用替换来替换弃用成员的使用。 在此处输入图片说明
如何使用PHP重定向回我的起始页面以清除我的GET参数?我已经创建了一个表单,一旦填写完就会发送到.php文件,该文件处理GET数据并将其保存到数据库中.之后我使用header("Location:redirect.php")然后再次重定向到("Location:main.php").在这些都被执行后,我会被发送回看起来像主页面的东西,但是当我回来时,我得到了url formSaver.php?alot = ofparamters.如果我单击某些东西,我将进入main.php部分并且它可以工作.但如果有人在点击任何东西之前点击F5,我会得到双重输入.谁知道我做错了什么?