| | |
| | | * @param string $store_in the file to store the data in instead of returning them |
| | | * @return array The array with header data at index 0 and page content at index 1, returns boolean false on error. If $store_in is set only the headers are returned |
| | | */ |
| | | |
| | | |
| | | public static function get_with_headers($url, $store_in = null, $follow_redirects = false, $user_agent = false) { |
| | | if($follow_redirects === true) $follow_redirects = 5; |
| | | elseif($follow_redirects !== false) $follow_redirects--; |
| | |
| | | return array($headers, $response); |
| | | } else return $response; |
| | | } |
| | | |
| | | } |
| | | |
| | | ?> |