跟蹤了一下,我想這個fileserve接口已經完全變化了& V' y$ ~# K3 D
$getsessionurl = "http://www.fileserve.com/upload-track.php";: p0 D( `# R0 l4 Z8 B: {" I* T
$reffer = "http://www.fileserve.com/upload-file.php";
- p2 ^+ l$ w8 r $ch = curl_init();
1 C) ^/ |4 z+ r7 r+ l3 ?9 E: n curl_setopt($ch, CURLOPT_URL, $getsessionurl);
% }+ f) N$ q0 R curl_setopt($ch, CURLOPT_USERAGENT, $agent);
1 Z2 I: E4 N2 E1 ^; i9 m S) B curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
7 w- h" x) p/ B- u4 s. @9 S/ A! M curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);0 c7 j3 K. G3 H9 z2 s" ~
curl_setopt($ch, CURLOPT_HEADER, 1);
1 w+ h0 K0 N. \' B2 T7 \ curl_setopt($ch, CURLOPT_REFERER, $reffer);! E/ ^' J- n+ t+ ^7 P6 L
curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie_file_path);
8 q5 ~8 L+ a! ]0 C4 U3 ?; X curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie_file_path);, c' C" @. U+ v0 H) E, R/ |
$result = curl_exec($ch);% A4 e" a1 I1 V# n/ }. z
8 z" K0 i/ I% `) i5 e1 Z$ N( b
echo $result; ' j( ~8 T* L: K
$parse=explode('Id":"',$result);
" n! t l3 Y, N& L3 ?, m+ D3 s& w
: Y$ i! g% ^2 a$ y8 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
; `. f( E) d' y- U. V; _2 `2 o7 P根本沒有"Id",上面upload-file.php返回的情況類似 |