使用curl如果想发起的https请求正常的话有2种做法:方法一、设定为不验证证书和host。在执行curl_exec()之前。设置option$ch = curl_init();......curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);curl_s...
分类:
Web程序 时间:
2015-01-30 17:20:12
阅读次数:
210
1 /推荐使用新浪的: 2 $ch = curl_init(); 3 $url = "http://ip.dpool.sina.com.cn/iplookup/iplookup.php?format=json&ip=202.102.3.141"; //测试202.102.3.141 江苏省常...
简单说,调试报错了,Call to undefined function curl_init()。度了下,大家都说这样可以搞定(WAMP环境):1、在php.ini中找到extension=php_curl.dll,去掉前面的,php.ini一般在c:\windows下面。2、在php.ini中找到...
分类:
Web程序 时间:
2015-01-28 23:58:57
阅读次数:
341
最近看到网上说laravel 是php最火的一个框架,今天抽出时间先搞一搞。首先安装composer安装composer php-amqplib的依赖环境 curl -sS https://getcomposer.org/installer | phpmv composer.phar /usr...
分类:
其他好文 时间:
2015-01-28 19:43:53
阅读次数:
194
spf13-vim是我遇见过的最全也是最省事儿的vim配置方案,它是github上人家的一个开源项目
源地址 https://github.com/spf13/spf13-vim#spf13-vim--steve-francias-vim-distribution
一步自动安装配置
sudo curl https://j.mp/spf13-vim3 -L > spf13-vim.sh &...
分类:
系统相关 时间:
2015-01-28 14:47:09
阅读次数:
289
服务器端:
#yum install curl-devel expat-devel gettext-devel openssl-devel zlib-devel perl-devel
##wget https://github.com/git/git/archive/v2.2.0.tar.gz
#tar zxvf git-2.2.0.tar.gz
#cd git-2.2.0
#make ...
分类:
其他好文 时间:
2015-01-28 13:02:13
阅读次数:
138
最近游戏已上线运营,进行服务器内存优化,发现一个非常奇妙的问题,我们的认证服务器(AuthServer)负责跟第三方渠道SDK打交道(登陆和充值),由于采用了curl阻塞的方式,所以这里开了128个线程,奇怪的是每次刚启动的时候占用的虚拟内存在2.3G,然后每次处理消息就增加64M,增加到4.4G就不再增加了,由于我们采用预分配的方式,在线程内部根本没有大块分内存,那么这些内存到底是从哪来的呢?让人百思不得其解。...
分类:
编程语言 时间:
2015-01-27 21:57:26
阅读次数:
427
官方demo // 创建一对cURL资源
$ch1 = curl_init();
$ch2 = curl_init(); // 设置URL和相应的选项
curl_setopt($ch1, CURLOPT_URL, "http://www.example.com/");
curl_setopt($ch...
分类:
Web程序 时间:
2015-01-27 10:49:59
阅读次数:
170
jq使用文档:http://stedolan.github.io/jq/manual/举例:{"name": "han","age": "20"}curl -s -d 'user=aa&pass=cc' http://www.example.com | jq '.name' >> file.txtc...
分类:
Web程序 时间:
2015-01-27 10:42:01
阅读次数:
161
repo下载与安装:(后面两行的作用暂时不详)curl "http://php.webtutor.pl/en/wp-content/uploads/2011/09/repo" >~/bin/reporepo init -u git://codeaurora.org/platform/manifest...
分类:
移动开发 时间:
2015-01-26 22:35:58
阅读次数:
230