跟蹤了一下,我想這個fileserve接口已經完全變化了1 D+ r/ a- N! t- d
$getsessionurl = "http://www.fileserve.com/upload-track.php";
) g2 O, D6 n$ d6 Z$ a $reffer = "http://www.fileserve.com/upload-file.php";# s0 b' [7 Z" ~4 Q {7 z
$ch = curl_init();" ?3 K, x5 u- t
curl_setopt($ch, CURLOPT_URL, $getsessionurl); A& w- C: C$ g6 q4 Q/ Z; j& ?1 R0 a
curl_setopt($ch, CURLOPT_USERAGENT, $agent);6 B- k2 w& E" l8 l) a
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$ @0 f$ z- ~" I/ t8 s curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);# d% y2 h1 m Q. Q" k
curl_setopt($ch, CURLOPT_HEADER, 1);
' N1 s& }0 w6 a) \2 |/ V! n curl_setopt($ch, CURLOPT_REFERER, $reffer);
' |! [0 z7 _1 [& M curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
6 \5 M! T* {. e3 ^ h+ \ curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);% e3 g9 P+ \& i& J* G5 J* G
$result = curl_exec($ch);
- v' f/ @' J8 i# r6 w
# V6 ~: {4 e' x4 E# H2 Secho $result; - k( x# ^, D, `+ e& T. K) L
$parse=explode('Id":"',$result);; d4 t9 s4 H: ~
+ q* Y& v' U7 n; ]( e返回的是: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( f6 I# O2 m6 [5 @4 W3 n, ~
根本沒有"Id",上面upload-file.php返回的情況類似 |