Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Get domain name from full URL Example

<?php 
// php get domain name with https. 
 
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on') 
    $fullurl = "https"; 
else
    $fullurl = "http"; 
  
// Now put the default URL characters using PHP. 
$fullurl .= "://"; 
  
// put the host(domain name, ip) to the URL using PHP. 
$fullurl .= $_SERVER['HTTP_HOST']; 
  
// put the requested resource location to the URL using PHP
$fullurl .= $_SERVER['REQUEST_URI']; 
      
// display the fullurl 
echo $fullurl; 
?> 

//https://www.pakainfo.com/
Source by www.pakainfo.com #
 
PREVIOUS NEXT
Tagged: #Get #domain #full #URL #Example
ADD COMMENT
Topic
Name
2+5 =