跟蹤了一下,我想這個fileserve接口已經完全變化了! A% F; ^% X. A1 p! x5 A: K
$getsessionurl = "http://www.fileserve.com/upload-track.php";
/ Z7 g; m4 S! n# t, U $reffer = "http://www.fileserve.com/upload-file.php";
6 l+ O3 g! h+ ^0 g( g+ i T# G $ch = curl_init();
: R0 }9 u6 p. p9 i2 |: X curl_setopt($ch, CURLOPT_URL, $getsessionurl);$ B8 M+ v) o8 u
curl_setopt($ch, CURLOPT_USERAGENT, $agent);. p1 r- e h5 W4 L
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);; y ]7 Y0 T" V$ q7 u" j$ [& i
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
; _$ a8 g( O' S1 i0 ~ curl_setopt($ch, CURLOPT_HEADER, 1);
! U. y N3 Z0 O3 Z curl_setopt($ch, CURLOPT_REFERER, $reffer);% [7 a, g; |+ N4 R! f; r4 y3 s
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
/ e# `* _4 Z4 w/ a curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);7 C7 Z% N9 w0 v. r' a
$result = curl_exec($ch);
1 w( t" _" N* x% W# |. W* I
% G. j4 V5 l" t( P' D- techo $result; 2 s$ Z, {3 b3 b% K. q2 c5 G
$parse=explode('Id":"',$result);7 Y; i6 ]( @: h" p
& x4 ^3 e: D- @' U. r返回的是: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
# V% ?# W9 A+ t. k+ g, U根本沒有"Id",上面upload-file.php返回的情況類似 |