$_post_url = 'http://XXXXX/XXX';  

    $post = 'key=12&content_id='.$content_id.'&md5='.$storeStatusArr['insert_md5'].'&url='.$url;  

    $curl = curl_init ( $_post_url );
curl_setopt ( $curl, CURLOPT_HEADER, 0 );
$header = array ();
$header [] = 'Host:www.XXXX.co';
$header [] = 'Connection: keep-alive';
$header [] = 'User-Agent: ozilla/5.0 (X11; Linux i686) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1';
$header [] = 'Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8';
$header [] = 'Accept-Language: zh-CN,zh;q=0.8';
$header [] = 'Accept-Charset: GBK,utf-8;q=0.7,*;q=0.3';
$header [] = 'Cache-Control:max-age=0';
$header [] = 'Cookie:t_skey=p5gdu1nrke856futitemkld661; t__CkCkey_=29f7d98';
$header [] = 'Content-Type:application/x-www-form-urlencoded';
curl_setopt ( $curl, CURLOPT_HTTPHEADER, $header );
curl_setopt ( $curl, CURLOPT_POST, 1);
curl_setopt ( $curl, CURLOPT_POSTFIELDS, $post );
$result = curl_exec ( $curl );
curl_close ( $curl );
var_dump ( $result );

http://blog.csdn.net/mengxiangbaidu/article/details/6948721#

PHP CURL POST提交的更多相关文章

  1. PHP CURL模拟提交数据 攻击N次方

    public function actionCurl(){ $data['DATA']='{"NAME":"c","LEGEND":&quo ...

  2. curl模拟提交

    function curl_post($url, $post){ $options = array( CURLOPT_RETURNTRANSFER =>true, CURLOPT_HEADER ...

  3. php curl 提交 总结

    1.post https提交 方法 function curl_post2($url='', $postdata='', $options=array()){ $ch = curl_init($url ...

  4. php curl模拟post请求提交数据

    最近在做校园图书馆图书信息的采集程序,既然是图书馆图书的采集,肯定有提交搜索的页面,无非是post提交,让我想到了curl模拟提交,首先通过firebug进行抓包查询下post提交后的格式如下: tx ...

  5. 在php中分别使用curl的post提交数据的方法和get获取网页数据的方法

    在php中分别使用curl的post提交数据的方法和get获取网页数据的方法整理分享一下额,具体代码如下: (1)使用php curl获取网页数据的方法: $ch=curl_init(); //设置选 ...

  6. PHP中curl的CURLOPT_POSTFIELDS参数使用细节

    CURL确实是一个不错的好工具,不仅在PHP中还是其他的操作系统中,都是一个非常好用的.但是如果你有些参数没有用好的话,那可能会得不到自己理想中的结果. 在通常情况下,我们使用 CURL 来提交 PO ...

  7. 详解php的curl几个函数

    关于php的curl一系列函数,这里解释一下它们的作用. 在html中,我们可以通过form设置http的post和get提交,但假如我们获取的数据不是从html中来的,而是php脚本主动向其他服务器 ...

  8. 用curl做异步操作

    class CurlPost { /** * @desc curl 请求提交数组 * */ public function execute($method, $url, $fields = '', $ ...

  9. php模拟post 提交表单

    <?php header('Content-type: text/html;charset=UTF-8'); $action=$_REQUEST['action']; //获取验证码 if($a ...

随机推荐

  1. 用Duplex实现消息广播

    WCF中定义3种消息交换模式: 1. Request/Reply; 2. One-Way; 3. Duplex.  Request/Reply 是缺省模式,即同步调用.在调用服务方法后需要等待服务的消 ...

  2. Java数据库连接池实现原理

    一般来说,Java应用程序访问数据库的过程是: 装载数据库驱动程序: 通过jdbc建立数据库连接: 访问数据库,执行sql语句: 断开数据库连接. public class DBConnection ...

  3. Fetch API 接口参考

    前言 Fetch API是新的ajax解决方案,用于解决古老的XHR对象不能实现的问题,Fetch API 提供了一个获取资源的接口(包括跨域请求),任何使用过 XMLHttpRequest 的人都能 ...

  4. angular学习笔记(三十)-指令(7)-compile和link(2)

    继续上一篇:angular学习笔记(三十)-指令(7)-compile和link(1) 上一篇讲了compile函数的基本概念,接下来详细讲解compile和link的执行顺序. 看一段三个指令嵌套的 ...

  5. [Windows Azure] How to Monitor Cloud Services

    How to Monitor Cloud Services To use this feature and other new Windows Azure capabilities, sign up ...

  6. 解密OpenTSDB的表存储优化【转】

    https://yq.aliyun.com/articles/54785 摘要: 本篇文章会详细讲解OpenTSDB的表结构设计,在理解它的表结构设计的同时,分析其采取该设计的深层次原因以及优缺点.它 ...

  7. FIDDLER的使用方法及技巧总结(连载二)FIDDLER用户界面

    FIDDLER的使用方法及技巧总结 (接上篇内容~~) 二.FIDDLER用户界面 FIDDLER用户的几面主要包括下面几个部分,如图所示:首先FIDDLER窗口的最左边是web session列表, ...

  8. Leetcode:Interleaving String 解题报告

    Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2. For ...

  9. python2 和 python3 区别

    python2 python 2 必须加object加入后是新式类 python 2 不加object是经典类 class HTTP(object): # 经典类和新式类 @staticmethod ...

  10. 用nodejs的express框架在本机快速搭建一台服务器

    [本文出自天外归云的博客园] 简介 用express框架在本机搭建一个服务器,这样大家可以通过指定的url来在你的服务器上运行相应的功能. Express是一个基于nodejs的框架,我们可以用它来完 ...