跟蹤了一下,我想這個fileserve接口已經完全變化了) c8 B; {) A& q, @) }! \
$getsessionurl = "http://www.fileserve.com/upload-track.php";7 h* _; d0 M0 c, d& T; k
$reffer = "http://www.fileserve.com/upload-file.php";
- S, c5 z/ U: Q8 }" H' u! W $ch = curl_init();
1 n6 o- _8 s4 J) e- @" _: L curl_setopt($ch, CURLOPT_URL, $getsessionurl);
* u4 y. }2 H. { curl_setopt($ch, CURLOPT_USERAGENT, $agent);
" c, ^9 a1 u7 L. l9 V& K2 ? curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);- M0 V7 Y& e! X% y: q6 z I
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);& ^- u* W+ Z z+ N/ p1 B, \
curl_setopt($ch, CURLOPT_HEADER, 1);
f' T0 {/ ]* | curl_setopt($ch, CURLOPT_REFERER, $reffer);
6 I# J- B0 h" O: h8 ~% d curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);( B# g P W8 ^
curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);% g6 j1 `0 v" g2 D" @) u7 _# e
$result = curl_exec($ch);
3 Z- q7 w8 L5 y2 x. v+ o , ^4 M* |$ E9 E2 m9 s! a9 S/ q
echo $result;
; J/ l) ]+ z0 j $parse=explode('Id":"',$result);
" A# x0 q8 ~3 ^4 A r/ I) ]3 d" S4 | C9 k6 M
返回的是: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
3 D+ K8 |, P5 ~根本沒有"Id",上面upload-file.php返回的情況類似 |