More whitespace fixes
This commit is contained in:
parent
4d684b3790
commit
e15683175e
@ -162,17 +162,17 @@ function post_url($url,$params, $headers = null, &$redirects = 0, $timeout = 0)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($http_code == 301 || $http_code == 302 || $http_code == 303) {
|
if($http_code == 301 || $http_code == 302 || $http_code == 303) {
|
||||||
$matches = array();
|
$matches = array();
|
||||||
preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches);
|
preg_match('/(Location:|URI:)(.*?)\n/', $header, $matches);
|
||||||
$newurl = trim(array_pop($matches));
|
$newurl = trim(array_pop($matches));
|
||||||
if(strpos($newurl,'/') === 0)
|
if(strpos($newurl,'/') === 0)
|
||||||
$newurl = $url . $newurl;
|
$newurl = $url . $newurl;
|
||||||
$url_parsed = @parse_url($newurl);
|
$url_parsed = @parse_url($newurl);
|
||||||
if (isset($url_parsed)) {
|
if (isset($url_parsed)) {
|
||||||
$redirects++;
|
$redirects++;
|
||||||
return fetch_url($newurl,false,$redirects,$timeout);
|
return fetch_url($newurl,false,$redirects,$timeout);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$a->set_curl_code($http_code);
|
$a->set_curl_code($http_code);
|
||||||
$body = substr($s,strlen($header));
|
$body = substr($s,strlen($header));
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user