跟蹤了一下,我想這個fileserve接口已經完全變化了' W/ ?* {; D1 J& M
$getsessionurl = "http://www.fileserve.com/upload-track.php";
6 }/ A u# s4 o9 [% B9 Y $reffer = "http://www.fileserve.com/upload-file.php";, @2 W! j5 O. l( j/ _* T; z
$ch = curl_init();
$ t; y. j, R- h" ^- k curl_setopt($ch, CURLOPT_URL, $getsessionurl);
- s/ p' ^' G$ ^# ^6 F/ s; T9 t& x curl_setopt($ch, CURLOPT_USERAGENT, $agent);. F7 _) B7 R/ {" [ G. o
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
/ j z, R6 D6 H$ M curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);8 j: s) G, N$ G% p. {& S' u$ k4 K
curl_setopt($ch, CURLOPT_HEADER, 1);
4 j z# r, \( G curl_setopt($ch, CURLOPT_REFERER, $reffer);) e2 d/ a9 K3 A9 G7 x, L
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);/ v0 L' J4 {7 p$ O' W
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
, x4 ~; P4 t3 V- e, h' d5 P9 C $result = curl_exec($ch);
& }1 L7 V" J3 H 0 O) A- a2 z! i/ a4 t, `
echo $result; # A# W# k1 s3 }1 y: X6 O( q
$parse=explode('Id":"',$result);
4 B1 G$ A1 d& R/ M7 `8 L$ z, I# |0 i. j& r4 m/ a! \3 X! m: X
返回的是:HTTP/1.1 410 Gone X-Powered-By: PHP/5.3.1 Content-type: text/html Content-Length: 0 Date: Tue, 20 Sep 2011 02:18:44 GMT Server: fileserve
6 `! z3 j0 h6 K8 ~% A; o根本沒有"Id",上面upload-file.php返回的情況類似 |