跟蹤了一下,我想這個fileserve接口已經完全變化了
) R" C2 x" N( t1 }7 P, D $getsessionurl = "http://www.fileserve.com/upload-track.php";8 m1 e, Y/ B7 u% h* t( X
$reffer = "http://www.fileserve.com/upload-file.php";/ s# v* J5 E0 e# |
$ch = curl_init();8 b" t: a5 e' b' p& f' Y! g
curl_setopt($ch, CURLOPT_URL, $getsessionurl);0 g+ j3 [8 x0 B, W
curl_setopt($ch, CURLOPT_USERAGENT, $agent);8 j0 J7 x0 n! c. I
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
! h+ x2 c1 N" W6 s7 ?) y curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
) O; t# e* G& N7 j( w$ q curl_setopt($ch, CURLOPT_HEADER, 1);$ w# J1 F. w% N' K s+ J
curl_setopt($ch, CURLOPT_REFERER, $reffer);
' w( y- \# ^* y6 Y curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
# Q0 O! Q* d/ Q0 Q curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);
% i7 }. i% V1 d7 M $result = curl_exec($ch);
( J) v P1 @8 \
( f' e( C+ @( necho $result; / q! ]9 s6 b$ h8 C: x
$parse=explode('Id":"',$result);" Y6 F! ^+ q( U, Y6 \
0 n8 e. g, s9 z9 I$ @3 c6 `
返回的是: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
- b7 ?, C. \( f" I6 E. l4 O根本沒有"Id",上面upload-file.php返回的情況類似 |