Page 1 of 1

Event from another site?

Posted: Fri May 23, 2008 10:22 pm
by Zavin
Is it possible that if someone enters my site from another site that an event can occur? For example can I have any entry entered into my database if a user come to my site from a specific site?

Re: Event from another site?

Posted: Sat May 24, 2008 1:36 pm
by califdon
Zavin wrote:Is it possible that if someone enters my site from another site that an event can occur? For example can I have any entry entered into my database if a user come to my site from a specific site?
We often think of visitors "entering" a web site, but what is really happening is that an HTTP request is received by the web server, in response to which the server may send a page back to the requestor or perform some other action. PHP can obtain data from every HTTP request and use that to log visitors or anything else. Here's a good discussion of obtaining the URL of the site from which a link has brought a visitor to your site:
http://forums.digitalpoint.com/showthread.php?t=835