Yngvarr

Generation

generate functionSat, 07 Jan 2023

gzencode and stream http archive

<?php function gzencode_and_stream_http_archive() { function get_current_url() { $pageURL = 'http'; if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") { $pageURL .= "s"; } $pageURL .= "://"; if ($_SERVER["SERVER_PORT"] != "80") { $pageURL .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] . $_SERVER["REQUEST_URI"]; } else { $pageURL .= $_SERVER["SERVER_NAME"] . $_SERVER["REQUEST_URI"]; } return $pageURL; } $url = get_current_url(); header("Content-Type: application/x-gzip"); header("Content-Disposition: attachment; filename=web.archive"); $curl = curl_init(); curl_

Questions about programming?Chat with your personal AI assistant