跟蹤了一下,我想這個fileserve接口已經完全變化了0 { _2 ?! J- i+ [& }) j' V8 N, k
$getsessionurl = "http://www.fileserve.com/upload-track.php";3 f' p% p T. O7 ~8 |; x: @
$reffer = "http://www.fileserve.com/upload-file.php";& C6 K8 H8 _8 W0 ^# p2 Z$ n1 O! A
$ch = curl_init();
P. ^4 v$ s0 Y6 r$ r& h5 o6 | curl_setopt($ch, CURLOPT_URL, $getsessionurl);
8 O3 m7 a. ~" O9 _( R curl_setopt($ch, CURLOPT_USERAGENT, $agent);
+ J0 |0 f$ t1 I1 [ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);; E9 `. c, `: |$ [
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); `" r6 @0 d& D/ [2 R5 [: B
curl_setopt($ch, CURLOPT_HEADER, 1);% X4 g( v1 C$ H& R
curl_setopt($ch, CURLOPT_REFERER, $reffer);
" s. k$ J6 E8 U4 }/ O curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
) l5 p' B* ?; ]% m6 i* c( O, ^ curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);! A" h7 e3 t' F& r- M; s/ C+ k# Z
$result = curl_exec($ch);
- V" @( ^" f1 M% n4 R8 j
8 T2 b, i# M+ Uecho $result; % F" z, b5 j) J6 l
$parse=explode('Id":"',$result);9 `9 ^0 z& v [: s* Z
. e" p& k/ t/ ~1 d0 \" e) W返回的是: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
+ [' a* o- ?" d7 g; h; z7 J! g根本沒有"Id",上面upload-file.php返回的情況類似 |