Also remember that the HTTP_REFERER index may not always be set as not all requests will contain the Referrer header.<br><br>Tom<br><br><div class="gmail_quote">2009/10/27 Simon Ferre <span dir="ltr">&lt;<a href="mailto:simon.ferre@onetwodo.co.uk">simon.ferre@onetwodo.co.uk</a>&gt;</span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi<br>
<br>
I believe what you are looking for is not a function, but a PHP variable:<br>
<br>
_SERVER[&quot;HTTP_REFERER&quot;]<br>
<br>
Gives you the page that referred you to the current page.<br>
<br>
Do a phpinfo(); to find out more...<br>
<font color="#888888"><br>
Simon<br>
</font><div><div></div><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:phpwm-bounces@mailman.lug.org.uk">phpwm-bounces@mailman.lug.org.uk</a><br>
[mailto:<a href="mailto:phpwm-bounces@mailman.lug.org.uk">phpwm-bounces@mailman.lug.org.uk</a>] On Behalf Of Peter Crouch<br>
Sent: 27 October 2009 10:39<br>
To: West Midlands PHP User Group<br>
Subject: [Phpwm] Simple? question<br>
<br>
Hello to you all,<br>
<br>
I have spent some time looking through the online PHP reference manual<br>
searching for a function which will return the URL or URI of the web<br>
page from which it is invoked, without success.<br>
<br>
I want to write a PHP script which will construct bookmarks for the<br>
likes of Facebook and Twitter for any web page from which it is called.<br>
I suspect I am trying to reinvent the wheel!<br>
<br>
I am sure that some of you experts will be able to point me in the right<br>
direction very quickly!<br>
<br>
Thanks in advance for any help you can give me.<br>
<br>
Peter Crouch<br>
-------------------------------------------------<br>
Tel: 0121 523 6756<br>
Mobile: 0776 877 0475<br>
Email: <a href="mailto:pccrouch@bcs.org.uk">pccrouch@bcs.org.uk</a><br>
<br>
**********************************************************************<br>
This email and any files transmitted with it are confidential and<br>
intended solely for the use of the individual or entity to whom they<br>
are addressed. If you have received this email in error please notify<br>
the system manager.<br>
**********************************************************************<br>
<br>
<br>
_______________________________________________<br>
Phpwm mailing list<br>
Website : <a href="http://www.phpwm.org" target="_blank">http://www.phpwm.org</a><br>
Twitter : <a href="http://www.twitter.com/phpwm" target="_blank">http://www.twitter.com/phpwm</a><br>
Facebook: <a href="http://www.facebook.com/group.php?gid=2361609907" target="_blank">http://www.facebook.com/group.php?gid=2361609907</a><br>
<br>
Post to list: <a href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>
Archive etc : <a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a><br>
<br>
<br>
_______________________________________________<br>
Phpwm mailing list<br>
Website : <a href="http://www.phpwm.org" target="_blank">http://www.phpwm.org</a><br>
Twitter : <a href="http://www.twitter.com/phpwm" target="_blank">http://www.twitter.com/phpwm</a><br>
Facebook: <a href="http://www.facebook.com/group.php?gid=2361609907" target="_blank">http://www.facebook.com/group.php?gid=2361609907</a><br>
<br>
Post to list: <a href="mailto:Phpwm@mailman.lug.org.uk">Phpwm@mailman.lug.org.uk</a><br>
Archive etc : <a href="https://mailman.lug.org.uk/mailman/listinfo/phpwm" target="_blank">https://mailman.lug.org.uk/mailman/listinfo/phpwm</a><br>
</div></div></blockquote></div><br>