跟蹤了一下,我想這個fileserve接口已經完全變化了& F. C( x1 S# T! i, ?
$getsessionurl = "http://www.fileserve.com/upload-track.php";0 ~5 k% ], w8 \
$reffer = "http://www.fileserve.com/upload-file.php";
! m) C. o: |& Y1 F $ch = curl_init();
. o! X5 D& R [5 o% L curl_setopt($ch, CURLOPT_URL, $getsessionurl);$ p: w/ E- |, B* Z
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
, t& D' r; E3 h6 n* v8 J3 o curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
8 z& J+ y0 I0 V) z curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);: G( l+ s4 `" u
curl_setopt($ch, CURLOPT_HEADER, 1);
2 @/ T4 D, D3 H5 B curl_setopt($ch, CURLOPT_REFERER, $reffer);* Z% v/ g6 U. h6 H
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
& D. K6 n; y v, X, U curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);; X6 K8 N& e' b ?
$result = curl_exec($ch);
. x7 [: j5 T& i4 T, Y ?# V r8 a% q& e( {! M) q; W. _8 A
echo $result; , W* d; G2 I9 w9 K
$parse=explode('Id":"',$result);( E: I; p8 I0 Q
" i) [6 q9 R* J& p: q+ U& |
返回的是: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* |+ R( W/ \+ S: f! V5 D
根本沒有"Id",上面upload-file.php返回的情況類似 |