Created
August 26, 2013 19:31
Revisions
-
dars created this gist
Aug 26, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ <?php $verbose = fopen('php://temp', 'rw+'); $options = array( CURLOPT_RETURNTRANSFER => 1, // 不直接印出結果 CURLOPT_URL => $target_url, CURLOPT_POST => true, CURLOPT_POSTFIELDS => $query_string, //$data, // 直接給array CURLOPT_VERBOSE => true, CURLOPT_STDERR => $verbose ); curl_setopt_array($ch, $options); $result = curl_exec($ch); curl_close($ch); !rewind($verbose); $verboseLog = stream_get_contents($verbose); echo '<pre>debug:'; var_dump($verboseLog); echo $query_string."\n"; var_dump($result);