草庐IT

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 - 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

php - [Microsoft][SQL Server Native Client 11.0]共享内存提供程序 : Timeout error [258]

美好的一天。我在php5上有网站。所有查询均使用sqlsrv执行;当我进行查询时出现错误:[Microsoft][SQLServerNativeClient11.0]SharedMemoryProvider:Timeouterror[258]如何修复错误? 最佳答案 此错误可能是由于连接速度非常慢或SQL查询耗时过长造成的。这不是SQLServer的问题。尝试在PHP的connectionString中扩展超时值。SeethispreviousanswerYouneedtochangesomesettinginyourphp.ini

PHP $client->__soapCall ('method' , $params);对比。 $客户端->方法($参数);

我正在用PHP创建一个SOAP客户端。我的大部分电话都是这样的$client->__soapCall('method',$params)据我所知,这是在WSDL中调用方法的两种方法之一,另一种是:$client->method($params);在调用只需要字符串的方法时,我只能使用第二种方法。使用需要整数的方法会给我这个错误:Thevalue''cannotbeparsedasthetype'Int32'.'这两个请求的工作方式有何不同? 最佳答案 直接调用($client->method())使用已弃用的魔法类方法__call(

php - 使用 PHP Google_Client、Google_Service_Blogger 通过 API v3 列出 Blogger 帖子

我正在使用GooglePHP客户端库来访问GoogleAPI(参见reference)我正在尝试从私有(private)博客中获取帖子列表(与RSS提要中的内容相同)。私有(private)博主博客显然没有开放的RSS提要,所以这是我对两者的尝试以编程方式检索博客内容满足博客的隐私限制。API客户端中使用的token是博客的授权读者。这是代码。这一切都很好(连接、检索正确的博客对象等),但在尝试使用getItems函数本身获取发布数据时失败(参见librarysource,第2007行)。返回一个空数组。$client=newGoogle_Client();$client->setCl