Skip to content

Commit

Permalink
del comment
Browse files Browse the repository at this point in the history
  • Loading branch information
lsjing committed Apr 1, 2015
1 parent cd427c9 commit 47da099
Showing 1 changed file with 0 additions and 14 deletions.
14 changes: 0 additions & 14 deletions QCloud.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ public function run(){
}

$this->url .= 'signature=' . $this->doSignature($this->public_args);
//$this->d($this->url, 0, 1);
$r = $this->curl_request($this->url);
$r = json_decode($r, true);
echo '<pre>';
Expand Down Expand Up @@ -97,14 +96,12 @@ public function doSignature($args){
return $sign;
}

//参数1:访问的URL,参数2:post数据(不填则为GET),参数3:提交的$cookies,参数4:是否返回$cookies
function curl_request($url,$post='',$cookie='', $returnCookie=0){
$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, $url);
curl_setopt($curl, CURLOPT_USERAGENT, 'Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; Trident/6.0)');
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($curl, CURLOPT_AUTOREFERER, 1);
//curl_setopt($curl, CURLOPT_REFERER, "http://XXX");
if($post) {
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, http_build_query($post));
Expand All @@ -130,16 +127,5 @@ function curl_request($url,$post='',$cookie='', $returnCookie=0){
return $data;
}
}

public function d($arg, $a=false, $b=false){
echo '<pre>';
($a)?var_dump($arg):print_r($arg);
echo '</pre>';
($b)?exit:'';
}

}



?>

0 comments on commit 47da099

Please sign in to comment.