跟蹤了一下,我想這個fileserve接口已經完全變化了6 k9 j+ ^; e, B/ w- `
$getsessionurl = "http://www.fileserve.com/upload-track.php";/ G' U( s. W3 H5 ^, ~1 \% b+ f
$reffer = "http://www.fileserve.com/upload-file.php";& J% a( H! W& u5 ^' D. `' I$ y
$ch = curl_init(); g, S8 K K. E$ H. C8 q; ]
curl_setopt($ch, CURLOPT_URL, $getsessionurl);* C, \" F# j: S6 x2 s }0 l
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
$ l& D5 m) `$ t8 l3 f curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);/ \7 v9 `+ [9 G K m' D8 e5 h, U
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
9 ]" W4 |; B& T+ {& \* D curl_setopt($ch, CURLOPT_HEADER, 1);! E" h8 Q) i3 i& @" ~
curl_setopt($ch, CURLOPT_REFERER, $reffer);% Y4 k/ m+ u% J* F r
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);1 O( e* }$ t, z
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);9 c- o. {9 R) u5 Z, j# c% V7 e
$result = curl_exec($ch);
7 x; ]( M$ X0 P4 N4 o & a0 F: U+ m) l- ]
echo $result; 3 [, k3 j2 H7 v. v. g
$parse=explode('Id":"',$result);) n" e" d' b( A- G: \$ p$ I
6 K- W; i5 I& R0 @7 [: P返回的是: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
" E' {' q9 C* @: r. h0 f6 @0 o$ \& C根本沒有"Id",上面upload-file.php返回的情況類似 |