filereader cleanup
This commit is contained in:
parent
3f7c4a50a6
commit
f8dc43e517
@ -58,24 +58,6 @@ class AsynchronousFileReader {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a new cURL Request for the given URL, DO NOT CALL MANUALLY!
|
|
||||||
*
|
|
||||||
* @param string $url
|
|
||||||
* @return Request
|
|
||||||
*/
|
|
||||||
public function newRequest($url) {
|
|
||||||
$request = new Request($url);
|
|
||||||
$request->getOptions()->set(CURLOPT_TIMEOUT, 60)->set(CURLOPT_HEADER, false)// don't display response header
|
|
||||||
->set(CURLOPT_CRLF, true)// linux line feed
|
|
||||||
->set(CURLOPT_ENCODING, '')// accept encoding
|
|
||||||
->set(CURLOPT_USERAGENT, 'ManiaControl v' . ManiaControl::VERSION)// user-agent
|
|
||||||
->set(CURLOPT_RETURNTRANSFER, true); // return instead of output content
|
|
||||||
return $request;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load a Remote File
|
* Load a Remote File
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user