码迷,mamicode.com
首页 >  
搜索关键字:php_curl    ( 351个结果
php curl传输图片
今天项目中,运用到了通过curl传输图片,留下做笔记 foreach?($files?as?$key?=>?$file)?{ ????$post[$key]?=?‘@‘.realpath($file[‘tmp_name‘]).";type=".$file[‘type‘].";filename=".$file[‘name‘]...
分类:Web程序   时间:2015-09-07 13:07:41    阅读次数:163
php-fpm 在centos 7下的安装配置
安装php:sudo yum install php php-fpm php-mysql php-mbstring php-mcrypt php-sockets php-curl php-common php-xml启动php-fpm:sudo systemctl start php-fpm设置自动...
分类:Web程序   时间:2015-09-05 17:40:21    阅读次数:249
php小代码----curl模拟登录及登录后并通过多线程进行重复post数据提交
<?php functiongetRequestCookie($webHomePageUrl,$cookieFileName){ //初始化一个curl会话 $curl=curl_init(); $options=array( CURLOPT_URL=>$webHomePageUrl,//设置请求的url CURLOPT_HTTPGET=>1,//以get方式请求 CURLOPT_COOKIEJAR=>$cookieFileName,//连接结..
分类:编程语言   时间:2015-09-03 21:53:15    阅读次数:231
PHP CURL错误: error:140943FC
使用PHP访问https网站的时候,间歇性会报error:140943FC错误。google之,通过如下方案可处理:1、服务器ssl版本较高curl_setopt($this->curl, CURLOPT_SSLVERSION, 4);2、进程处理完毕之后关闭会话,不再缓存供重用curl_setop...
分类:Web程序   时间:2015-09-03 21:45:36    阅读次数:165
PHP Curl模拟登录并抓取数据
使用PHP的Curl扩展库可以模拟实现登录,并抓取一些需要用户账号登录以后才能查看的数据。具体实现的流程如下(个人总结):1. 首先需要对相应的登录页面的html源代码进行分析,获得一些必要的信息: (1)登录页面的地址; (2)验证码的地址; (3)登录表单需要提交的各个字段的名称和提交方式; (...
分类:Web程序   时间:2015-09-01 19:55:17    阅读次数:1208
这里讨论二个 PHP CURL CURLOPT 参数
CURLOPT_postfields 和 CURLOPT_httpheader 一,CURLOPT_HTTPHEADER :设置一个header中传输内容的数组。 curl_setopt($ch, CURLOPT_HTTPHEADER, array("Range: Bytes=0-50\nOtherheader: stuff\n")); curl_setopt($ch, CU...
分类:Web程序   时间:2015-08-27 13:26:56    阅读次数:169
解决PHP curl https时error 77(Problem with reading the SSL CA cert (path? access rights?))
服务器环境为CentOS,php-fpm,使用curl一个https站时失败,打开curl_error,捕获错误:Problem with reading the SSL CA cert (path? access rights?)解决方案:1. sudo yum install ca-certif...
分类:数据库   时间:2015-08-21 12:43:06    阅读次数:309
curl 要么 file_get_contents 获得授权页面的方法的必要性
今天,需要工作,需要使用 curl / file_get_contents 获得授权的必要性(Authorization)的页面内容。解决后写了这篇文章分享给大家。php curl 扩展,可以在server端发起POST/GET请求,訪问页面,并能获取页面的返回数据。比如要获取的页面:http://...
分类:Web程序   时间:2015-08-20 22:19:35    阅读次数:262
CURL的学习和应用
curl安装:xp下面的安装:修改php.ini文件的设置,找到php_curl.dll//取消下在的注释extension=php_curl.dlllinux下面安装:# wget http://curl.haxx.se/download/curl-7.17.1.tar.gz# tar zxvf ...
分类:Web程序   时间:2015-08-20 18:50:48    阅读次数:207
351条   上一页 1 ... 21 22 23 24 25 ... 36 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!