摘要: <?php $pid = pcntl_fork(); if ($pid == -1) { die("could not fork"); } elseif($pid == 0) { echo "I'm the child process \n"; } else { echo "I'm the pare 阅读全文
posted @ 2017-06-23 17:09 brady-wang 阅读(10757) 评论(1) 推荐(1) 编辑
摘要: $url = 'http://p1.qhimg.com/t013dfc89f8a039122c.jpg?size=690x460'; function http_get_data($url) { $ch = curl_init (); curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, 'GET' ); curl_setopt ( $ch, ... 阅读全文
posted @ 2017-06-23 16:43 brady-wang 阅读(721) 评论(0) 推荐(0) 编辑
摘要: 一、Linux curl用法举例: 1. linux curl抓取网页: 抓取百度: curl http://www.baidu.com 1 curl http://www.baidu.com 如发现乱码,可以使用iconv转码: curl http://iframe.ip138.com/ic.asp|iconv -fgb2312 curl http://iframe.ip138.co... 阅读全文
posted @ 2017-06-23 16:08 brady-wang 阅读(408) 评论(0) 推荐(0) 编辑