diff options
| author | Greg Roach <fisharebest@gmail.com> | 2014-04-27 09:22:27 +0100 |
|---|---|---|
| committer | Greg Roach <fisharebest@gmail.com> | 2014-04-27 09:22:27 +0100 |
| commit | 949f080c5ac17eae6c3f02de9f635538649d7745 (patch) | |
| tree | b9988f88c3722c2e0a7d847b8caac15dada966cd /library | |
| parent | a24329d817c8980a540b020fbbd1be52e1766d32 (diff) | |
| download | webtrees-949f080c5ac17eae6c3f02de9f635538649d7745.tar.gz webtrees-949f080c5ac17eae6c3f02de9f635538649d7745.tar.bz2 webtrees-949f080c5ac17eae6c3f02de9f635538649d7745.zip | |
Remove function from global scope
Diffstat (limited to 'library')
| -rw-r--r-- | library/WT/File.php | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/library/WT/File.php b/library/WT/File.php index d86862ef3c..4f39d2a97a 100644 --- a/library/WT/File.php +++ b/library/WT/File.php @@ -34,9 +34,10 @@ class WT_File { ////////////////////////////////////////////////////////////////////////////// public static function fetchUrl($url, $stream=null) { - $host = parse_url($url, PHP_URL_HOST); - $port = parse_url($url, PHP_URL_PORT); - $path = parse_url($url, PHP_URL_PATH); + $host = parse_url($url, PHP_URL_HOST); + $port = parse_url($url, PHP_URL_PORT); + $path = parse_url($url, PHP_URL_PATH); + $query = parse_url($url, PHP_URL_QUERY); if (!$port) { $port = parse_url($url, PHP_URL_SCHEME) == 'https' ? 443 : 80; @@ -49,7 +50,7 @@ class WT_File { return null; } - fputs($fp, "GET $path HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n"); + fputs($fp, "GET $path?$query HTTP/1.0\r\nHost: $host\r\nConnection: Close\r\n\r\n"); // The first part of the response include the HTTP headers $response = fread($fp, 65536); |
