I am trying ot grab the FULL url but only seem to be able to grab the first bit, everything after ? I cant seem to grab.
Here is my full path:
http://www.mysite.co.uk/detail.php?stock_ID=5
here is what Im getting:
http://www.mysite.co.uk/detail.php
and here is my code:
$actual_link = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
echo $actual_link;
Cheers before hand.
$_SERVER[‘REQUEST_URI’] SHOULD have the query string attached. It seems that it isnt though.
$_SERVER[‘QUERY_STRING’] will contain the rest. (But not the ?. You’ll have to insert that yourself)
Right I see, OK have added what I need after the ? and its working great.
Cheers for getting back to me
@multichild
Try this to get the all the other Server settings:
echo '<pre>';
print_r( $_SERVER );
echo '</pre>';