diff options
Diffstat (limited to 'function.php')
| -rw-r--r-- | function.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/function.php b/function.php index 9d957a5..87ec766 100644 --- a/function.php +++ b/function.php @@ -1,9 +1,12 @@ <?php function getHeader($url){ + $agent = "Retrieve HTTP headers online. v0.1"; $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); + curl_setopt($ch, CURLOPT_USERAGENT, $agent); $response = curl_exec($ch); $header_size = curl_getinfo($ch, CURLINFO_HEADER_SIZE); |
