Posts Tagged ‘ php curl ’
php 使用Curl、socket、file_get_contents三种方法模拟POST提交数据的函数, php模拟登陆论坛,不外乎如此, 函数代码如下: [ READ MORE ]
function getcontents($url){ $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT,10); $fcontents = curl_exec($ch); return $fcontents; } $str=getcontents(“http://wenwen.soso.com/“); 找到自己想要的 preg_match_all 替换 一下,so easy吧? HOHO~ [ READ MORE ]
淡泊以明志,宁静以致远!
探讨网络世界,闲聊人生百态!
岁月无声,静听小桥流水人家,连神都救不了我,唯独只有网络!