草庐IT

openshift-client-tools

全部标签

php - 防护 'Google_Auth_Exception' 获取 OAuth2 访问 token 时出错,消息 : 'invalid_client' ' error

我正在尝试通过gmailapi从Google获取邮件在收到token后对Google_Client进行身份验证时出现此错误fatalerror:未捕获异常“Google_Auth_Exception”,消息“获取OAuth2访问token时出错,消息:‘invalid_client’”在我的代码使用google-api-php-client-master很简单,我的代码如下require_once('config.php');require_once'autoload.php';$client=newGoogle_Client();$client->setScopes(array('h

javascript - 如何: test if client is a "desktop terminal"

恐怕我已经知道答案了,但我还是冒这个险:有谁知道是否有什么方法可以测试访问网站的客户端是否是瘦客户端(桌面终端)?这里的问题是,即使您考虑使用JavaScript(动画),瘦客户端也会开始严重滞后。我基本上想提供网站的“精简版”,根据客户端禁用所有特殊效果。我查看了用户代理,但它似乎没有提供任何有用的信息。有什么办法可以分辨吗? 最佳答案 没有真正干净的方法来解决这个问题,因为没有用于瘦客户端或远程桌面的HTTPheader之类的东西。但如果您确实需要一种识别慢速客户端的解决方案,您可以尝试以下方法。它类似于Google在map上使

php - Zend_Http_Client 在尝试请求无效 URL 时挂起

我正在使用Zend_Http_Client请求URL,HTTP客户端的超时设置为10。$config=array('adapter'=>'Zend_Http_Client_Adapter_Curl','curloptions'=>array(CURLOPT_USERAGENT=>'Zend_Curl_Adapter',CURLOPT_HEADER=>0,CURLOPT_VERBOSE=>0,CURLOPT_RETURNTRANSFER=>1,CURLOPT_TIMEOUT=>10,CURLOPT_SSL_VERIFYPEER=>false,),);为了测试,我还添加了一个设置的时间限制

php - google-api-php-client-0.5.0 回调网址?

我是集成api的新手,我正在尝试使用google-api-php-client-0.6.0,我在Google注册了我的应用程序,并在中配置了它们dev.siva.com虚拟主机中的simple.phpsetApplicationName('GoogleContactsPHPSample');$client->setScopes("http://www.google.com/m8/contacts/");//Documentation:http://code.google.com/apis/gdata/docs/2.0/basics.html//Visithttps://code.goo

php - socket client查数据时socket server是 "hit"吗?

我设置了一个PHP服务器每秒写入一个套接字。while(1){$message="Hello,World!";socket_write($socket,$message,strlen($message));sleep(1);}然后我有一个Lua客户端(CoronaSDK),它每1/10秒检查一次套接字是否有数据:timer.performWithDelay(100,function()sock:receive()end,0)end我的问题是:每次运行sock:receive()时服务器是否“命中”?还是sock:receive()只检查本地缓冲区?重新表述这个问题:我运行sock:re

php - yii : how to enable ajax if client insert space in textfield

在yii中,我在yii1.1.X的clientoptions中找到了validateOnChange和validateOnType但如果客户端在textField中输入空格,我需要启用ajax就像stackoverflow中的标签一样这是我的_form.phpbeginWidget('CActiveForm',array('id'=>'text-form',//Pleasenote:Whenyouenableajaxvalidation,makesurethecorresponding//controlleractionishandlingajaxvalidationcorrectly

php - 如何通过 Openshift 访问套接字

我在Openshift.com上注册并创建了一个catridge。但是当我需要部署一个MQTTServerMosquitto,通过tcp或者ssl协议(protocol)访问,需要公网IP访问。Openshift是否只是通过80/443端口将http/https协议(protocol)重定向到8080?是否可以在Openshift中使用套接字通信?我在Openshift中创建了两个应用程序,一个用于推送,另一个用于Web部署,并且我停止了apache服务,以便让mosquitto服务监听8080。但是只有当我以https协议(protocol)发送post请求时,它可以访问服务器一段时

php - Google 云端硬盘服务帐户和 "Unauthorized client or scope in request"

我有3个使用DriveSDK的服务帐户。1,有效,2无效。返回的错误是“ErrorrefreshingtheOAuth2token,message:'{"error":"unauthorized_client","error_description":"Unauthorizedclientorscopeinrequest."}'"所有3个帐户都已在开发者控制台中注册。所有3个都被授权在GoogleApps控制台中进行“ManagedClientAPIaccess”。所有3个都有范围“https://www.googleapis.com/auth/drive.readonly”。所有3个

php - haxe (php) https 调用 : stream_socket_client() Peer certificate CN did not match expected CN

我正在使用haxe的Http类(编译为php)通过https将request()发送到AWS。这是一个使用haxe-aws库(https://github.com/Blank101/haxe-aws)的最小示例:variamconf=newIAMConfig('newbucket.s3-eu-central-1.amazonaws.com',accessKey,secretKey,'eu-central-1','s3');varsig4=newSig4Http('https://newbucket.s3-eu-central-1.amazonaws.com/',iamconf);sig

php - Oauth 2 $client->getAccessToken() 返回空值

我正在使用codeigniterMVC框架使用谷歌客户端库登录我的网站。当谷歌使用代码重定向并且我执行以下代码时,一切都运行良好,期待$client->getAccessToken()。$client->getAccessToken()返回空值。我看了很多教程,但没有得到任何帮助。这是我的Controller功能一的代码。在此函数中,我设置我的凭据以创建authUrl。publicfunctionlogin(){//Includetwofilesfromgoogle-php-clientlibraryincontrollerinclude_onceAPPPATH.'third_part