ChinaUnix.net
相关文章推荐:

php curl post

curl是一个很好很强大的工具,但php并不自带这个类库,而且我们只是要实现post方法,杀鸡焉用牛刀。纯php就能实现,还没有兼容性的问题。

这个函数是php.net/manual/en/function.stream-context-create.php" target=_blank>stream_context_create,有了它我们就可以非常方便地实现post提交...

by togofree - Web开发 - 2011-12-20 09:48:48 阅读(899) 回复(0)

相关讨论

php curl post数据的问题 今天在做一个api增量的功能的时候出现了一个特别奇怪的问题。我用curl 想tomcat post数据的时候,tomcat竟然报错,所我post的数据 没有正确或得。但是,我用curl post给我自己写的一个页面,就可以在$_post数组中获得数据。 为什么会出现这种问题那? 原因是在构建post 数据的数量出现问题。。。[code]1 function api_notice_increment($url, $data) 2 { 3 $ch = curl_init(); 4 ...

php

by 听老歌 - PHP - 2011-03-30 23:32:08 阅读(2378) 回复(1)

php curl 上传文件以post方式 上传文件为什么找不到上传过来的文件? Array ( [upload] => Array ( [name] => test.rar [type] => application/octet-stream [tmp_name] => C:\wamp\tmp\php36F.tmp [error] => 0 [size] => 3153 ) ) 上传结果, 没错啊, 临时文件里没。。,为什么呢???

curlphppost文件

by militala - PHP - 2010-03-25 15:24:41 阅读(3540) 回复(1)

phpcurlpost数据调用API简单示例 php代码[code]1.php 2./** 3. *@一个完整的post调用API的过程 百度知道 4. *@author: bo.xiao 5. */ 6. $url = 'http://zhidao.chanjet.com/restserver/zhidao'; 7. $data = array( 8. 'api_key'=>'3qQ2Edm62Vd4bAVCwNoxgn0l', 9. 'method'=>'baidu.zhidao.getQuestionList', 10. 'call_id'=>'1308713190', 11. 'cid'=>59...

php

by cu_Cbear - PHP - 2011-06-23 13:53:59 阅读(3206) 回复(0)

curl族函数发post请求到django的内置web server,效率很低。而http_post族函数不会有此类问题。 建议不要在生产环境中使用django的内置web server 本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u2/87830/showart_2003305.html

by sulpha - Linux文档专区 - 2009-07-22 11:40:40 阅读(1355) 回复(0)

phpcurl实现get,post 和 cookie(几个实例) 类似于dreamhost这类主机服务商,是显示fopen的使用的。使用phpcurl可以实现支持FTP、FTPS、HTTP HTPPS SCP SFTP TFTP TELNET DICT FILE和LDAP。curl 支持SSL证书、HTTP post、HTTP PUT 、FTP 上传,kerberos、基于HTT格式的上传、代理、cookie、用户+口令证明、文件传送恢复、http代理通道就最常用的来说,是基于http的 get和post方法。 代码实现: 1、http的get实现 php...

php编程

by 听老歌 - PHP - 2010-12-21 10:59:50 阅读(1759) 回复(0)

使用curl 来登录GOOGLE PICASA 下面是GOOGLE API中的说明 For the action URL parameter, use: https://www.google.com/accounts/ClientLogin API中的实例 post /accounts/ClientLogin HTTP/1.0 Content-type: application/x-www-form-urlencoded Email=johndoe@gmail.com&Passwd=north23AZ&service=cl&source=Gulp-CalGulp-1.05 我是这样用的 $curl -d "Content-type: application/x-www-form-urlencoded Email=luowei03@s...

by lanclot - Linux系统管理 - 2007-11-06 15:52:16 阅读(3068) 回复(0)

php $_post Previous Page Next Page $_post 变量用于收集来自 method="post" 的表单中的值。 $_post 变量 $_post 变量是一个数组,内容是由 HTTP post 方法发送的变量名称和值。 $_post 变量用于收集来自 method="post" 的表单中的值。从带有 post 方法的表单发送的信息,对任何人都是不可见的(会显示在浏览器的地址栏),并且对发送信息的量也没有限制。 例子method="post"> Enter your name: Enter your age: 当用户点击...

by militala - php文档中心 - 2009-01-15 10:54:14 阅读(1315) 回复(0)

[code] $ch = curl_init(); // set up the request curl_setopt($ch, curlOPT_URL, 'http://www.example.com'); // make sure we submit this as a post curl_setopt($ch, curlOPT_post, true); //$postParams 是 准备post的数据 curl_setopt($ch, curlOPT_postFIELDS, $postParams); // make sure problems are caught curl_setopt($ch, curlOPT_...

by yueliangdao0608 - PHP - 2006-08-25 15:01:20 阅读(2047) 回复(3)

post后,怎么确定是否成功? curl返回值代码有几十个,可是我测试了2种情况: 1,成功 2,目标文件不存在 但echo $? 显示都是0 根据返回值好像判断不了哦 究竟要怎么才可以确定curl是否成功post呢?谢谢 下面是curl post数据的一个链接:http://bbs2.chinaunix.net/thread-1422644-1-2.html

by diyself - Shell - 2009-04-08 11:09:21 阅读(2563) 回复(2)

//curl Get数据 function _curl_get($url) { $ch = curl_init(); curl_setopt($ch, curlOPT_URL,$url); curl_setopt($ch, curlOPT_HEADER, 0); curl_setopt($ch, curlOPT_RETURNTRANSFER, 1); $data = curl_exec($ch); curl_close($ch); if ($data) return $data; else return false; } //curl post数据 function _cur...

by 傲枭 - php文档中心 - 2008-05-28 22:23:48 阅读(1385) 回复(0)