跟蹤了一下,我想這個fileserve接口已經完全變化了5 J/ g \8 ]2 l4 j
$getsessionurl = "http://www.fileserve.com/upload-track.php";- L( O! m, T; i. h/ p
$reffer = "http://www.fileserve.com/upload-file.php";
4 @. y1 L+ O# N6 |0 g) w $ch = curl_init();2 o$ t2 G' {) t% U: i1 ?, I( U8 F
curl_setopt($ch, CURLOPT_URL, $getsessionurl);8 D A# w+ J# q+ K4 |1 a u
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
; w1 T3 T" U3 `& V. z& U) {* x5 m curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- |5 k3 x* M7 H curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);! E5 r6 u5 z/ d2 V+ }8 M
curl_setopt($ch, CURLOPT_HEADER, 1);
4 O! H9 [; ]6 w) I1 n. t5 d- G- t, } curl_setopt($ch, CURLOPT_REFERER, $reffer);8 i4 I5 f- [) F1 \" R% V5 h- Z. k
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
8 P0 K! K- |8 k5 p3 K o* r curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);3 W4 n- C# C. h9 y
$result = curl_exec($ch);4 j7 t @) @; M
* B( `5 j# ~9 r
echo $result; ! }* \2 h B( ]( _0 `. K2 ?
$parse=explode('Id":"',$result);, x2 p* k" W- o) b, X
7 I( F% O9 p# K- |8 I
返回的是: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
* y D6 w$ j2 x5 k& \根本沒有"Id",上面upload-file.php返回的情況類似 |