跟蹤了一下,我想這個fileserve接口已經完全變化了1 _3 j S0 y) ]$ s1 L8 U0 C6 v/ |
$getsessionurl = "http://www.fileserve.com/upload-track.php";3 S0 c4 D- q( N" j4 U4 \/ k
$reffer = "http://www.fileserve.com/upload-file.php";7 Z& H# y) X% V" L+ R* ^# e
$ch = curl_init();
0 p1 q" l4 j3 V4 U9 b; [ curl_setopt($ch, CURLOPT_URL, $getsessionurl);
( J0 A) ~' \+ W" B; ? curl_setopt($ch, CURLOPT_USERAGENT, $agent);
# c6 N0 O0 g, U6 ` curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);3 c a) T; h3 y1 s# y3 S
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);' L: K/ i" b9 Y i2 S/ t1 \
curl_setopt($ch, CURLOPT_HEADER, 1);' i" M0 ]7 w6 k2 o( S% c
curl_setopt($ch, CURLOPT_REFERER, $reffer);& Q7 y9 C' r" [3 p1 S
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);, W, B% r$ g* O( p/ n& N8 k6 u
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
# }5 i- \: Y" [& L6 @- E: M* V $result = curl_exec($ch);6 E- |) l6 @ R9 p8 d: i, D& Z k
2 v; [9 B" H7 _- ^echo $result;
: d4 }8 Q/ C% ] $parse=explode('Id":"',$result);7 l! Q8 [5 ^% \1 x+ Z8 m$ ]4 l
3 r# z! h9 V% c: K& l# G# D3 `返回的是: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, d3 ~0 [. |- c. D
根本沒有"Id",上面upload-file.php返回的情況類似 |