PHP get current url php - Net-Raft.com

Welcome aboard! We are happy you are here and wish you good net-raft!




Just a Web Code Solution

get current url php


 627

PHP


1

<?php

$url = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];
$protocol = stripos($_SERVER['SERVER_PROTOCOL'],'https') === true ? 'https://' . $url : 'http://'. $url;

echo $protocol;

?>


By     Created   
The power of the user (%)
10%

PHP


0

<?php

echo 'http://'. $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI'];

?>


By     Created   
The power of the user (%)
4%



The most helpful PHP solutions

detect browser phpdetect browser phpPHP

Click to see more ...

  3.2K     384

create QR code phpcreate QR code phpPHP

Click to see more ...

  2.2K     273

delete array item phpdelete array item phpPHP

Click to see more ...

  1.7K     229

create relative date phpcreate relative date phpPHP

Click to see more ...

  1.4K     215

detect ie phpdetect ie phpPHP

Click to see more ...

  1.1K     209

get current url phpget current url phpPHP

Click to see more ...

  627     188

Get real client country using php ?Get real client country using php ?PHP

Click to see more ...

  538     168

get meta tag phpget meta tag phpPHP

Click to see more ...

  446     128

detect speed internet phpdetect speed internet phpPHP

Click to see more ...

  472     106

How can I create an object using php ?How can I create an object using php ?PHP

Click to see more ...

  400     103