Hi
is there a way in a php script (lets say the "myscript.php") to detect if it was called with this url:
http://domain.com/myscript.php#12
or this:
http://domain.com/myscript.php
some kind of server variable I don't know of?
I'm talking about a direct url request of which the $_SERVER['HTTP_REFERER'] is not set.
thank you
P.S: I know I can do this with javascript.
detecting a " #" and what's after it in PHP
Moderator: General Moderators
-
scriptmaster
- Forum Newbie
- Posts: 20
- Joined: Wed May 21, 2003 8:26 pm
Code: Select all
<?php
// http://php.net/manual/en/function.parse-url.php
$array = parse_url('http://forums.devnetwork.net/viewtopic.php?t=33756&something=foo#bar');
print_r($array);
?>Code: Select all
Array (
їscheme] => http
їhost] => forums.devnetwork.net
їpath] => /viewtopic.php
їquery] => t=33756&something=foo
їfragment] => bar
)