finished asynchronousfilereader
This commit is contained in:
committed by
Steffen Schröder
parent
9b748fe067
commit
928aabb4d2
@ -22,13 +22,14 @@ abstract class FileUtil {
|
||||
if (!$url) {
|
||||
return null;
|
||||
}
|
||||
$urlData = parse_url($url);
|
||||
$port = (isset($urlData['port']) ? $urlData['port'] : 80);
|
||||
$urlData = parse_url($url);
|
||||
$port = (isset($urlData['port']) ? $urlData['port'] : 80);
|
||||
$urlQuery = isset($urlData['query']) ? "?" . $urlData['query'] : "";
|
||||
|
||||
$fsock = fsockopen($urlData['host'], $port);
|
||||
stream_set_timeout($fsock, 3);
|
||||
|
||||
$query = 'GET ' . $urlData['path'] . ' HTTP/1.0' . PHP_EOL;
|
||||
$query = 'GET ' . $urlData['path'] . $urlQuery . ' HTTP/1.0' . PHP_EOL;
|
||||
$query .= 'Host: ' . $urlData['host'] . PHP_EOL;
|
||||
$query .= 'Content-Type: ' . $contentType . PHP_EOL;
|
||||
$query .= 'User-Agent: ManiaControl v' . ManiaControl::VERSION . PHP_EOL;
|
||||
|
Reference in New Issue
Block a user