Question : how to get the link of the current page in php
Answered by : wild-weasel
<?php
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on')
$url = "https://";
else
$url = "http://";
// Append the host(domain name, ip) to the URL.
$url.= $_SERVER['HTTP_HOST'];
// Append the requested resource location to the URL
$url.= $_SERVER['REQUEST_URI'];
echo $url;
?>
Source : https://www.javatpoint.com/how-to-get-current-page-url-in-php | Last Update : Wed, 11 Mar 20
Question : current page link using php
Answered by : zealous-zebra-t8z8cxdi3xsl
$actual_link = "https://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo $actual_link ;
Source : https://www.campcodes.com/tutorials/php-tutorials/how-to-get-current-page-url-using-php/ | Last Update : Fri, 31 Dec 21
Question : php current page url
Answered by : vmxes
$protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
$host = $_SERVER['HTTP_HOST'];
$script = $_SERVER['SCRIPT_NAME'];
$params = $_SERVER['QUERY_STRING'];
$currentUrl = $protocol . '://' . $host . $script . '?' . $params;
echo $currentUrl;
Source : https://phpf1.com/tutorial/get-current-page-url.html | Last Update : Thu, 24 Dec 20
Question : get url link in php
Answered by : adrien-dumas
actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
Source : | Last Update : Tue, 26 Jan 21
Question : current page link using php
Answered by : zealous-zebra-t8z8cxdi3xsl
$url=$_SERVER['REQUEST_URI'];
echo $url;
Source : https://www.campcodes.com/tutorials/php-tutorials/how-to-get-current-page-url-using-php/ | Last Update : Fri, 31 Dec 21