网络请求:

 /**
* 发起HTTPS请求
*/
function curl_post($url,$data=null,$header=null,$post=0)
{
//初始化curl
$ch = curl_init();
//参数设置
$res= curl_setopt ($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_POST, $post);
if($post && !is_null($data))
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
if (!is_null($header))
curl_setopt($ch,CURLOPT_HTTPHEADER,$header);
$result = curl_exec ($ch);
//连接失败
curl_close($ch);
return $result;
}

最新文章

  1. 例如筋斗云的效果,但不通过offset定位的flag标记
  2. MyCAT常用分片规则之分片枚举
  3. Don't make a promise when you are in Joy. Don't reply when you are Sad.Don't take decisions when you are Angry.Think Twice.Act Wise.
  4. 【Python】pip国内安装源
  5. Java内存区域-- 运行时数据区域
  6. eclipse中配置c++开发环境 Eclipse + CDT + MinGW
  7. Python常用模块中常用内置函数的具体介绍
  8. kubectl自动补全
  9. ModelSerializer Meta设置
  10. H5的使用
  11. Ubuntu16.04 appstreamcli错误
  12. Memcache_分布式缓存
  13. char与unsigned char的区别
  14. HDU 5236 Article(概率DP)
  15. Delphi中break,exit,abort跳出循环的比较
  16. function, new function, new Function
  17. tcp连接的状态变迁以及如何调整tcp连接中处于time_wait的时间
  18. Python print() 函数
  19. StringBuffer类和String 类的 equals 和 ==
  20. 初探 hexo博客

热门文章

  1. systemtap 列出所有linux 内核模块与相关函数1
  2. linux 打补丁 2原理
  3. Linux 汇编语言开发指南
  4. careercup-排序和查找 11.3
  5. Android(java)学习笔记160:Framework运行环境之 Android进程产生过程
  6. android中实现简单的播放
  7. tomcat中设置多项目共享jar;类包
  8. 爬虫神器XPath,程序员带你免费获取周星驰等明星热门电影
  9. Git之路--1
  10. [转]jQuery选择器总结