| 3:54 am on Feb 20, 2006 (gmt 0)|
You probably want to look at $_SERVER['HTTP_REFERER']
| 4:43 am on Feb 20, 2006 (gmt 0)|
The problem is that $_SERVER['HTTP_REFERER'] is not being set by the site. Any other ideas?
| 5:20 am on Feb 20, 2006 (gmt 0)|
Do you have any idea how they are redirecting to your site?
| 6:27 am on Feb 20, 2006 (gmt 0)|
It is not actually a redirect. I think what is happening is that the site is requesting the current page from my site. It then parses the page adding their table with 'The following search terms have been highlighted: search terms' and adding style="background-color: tags throughout my pages html. It then serves up this page on their site. I want to catch it when they first request the page so they do not get the html to alter.
Looking at my server logs it seems that the initial request for index.php does not have a referrer but the requests for the .css and images do.
| 8:46 am on Feb 20, 2006 (gmt 0)|
How about simply blocking their IP?
| 1:07 am on Feb 21, 2006 (gmt 0)|
I initially looked at doing this as the best way to do it but blocking the IP address of their site did not seem to work. After you posted again I took another look at the server logs to see if I had gone wrong somewhere. Turns out the request for the page was not coming from the same IP address of the site but from another one in the same range. Once this was blocked - bingo.
Thanks for your help DrDoc.
| 5:48 pm on Mar 10, 2006 (gmt 0)|
Here's your solution...
$url = $_SERVER['SERVER_NAME'];
$page = $_SERVER['PHP_SELF'];
| 9:39 pm on Mar 10, 2006 (gmt 0)|
Welcome to WebmasterWorld, arubahost.
As a side not, REQUEST_URI and PHP_SELF are going to look a lot the same ... you will notice a difference though when you use mod_rewrite or Content Negotiation.
| 11:38 pm on Mar 10, 2006 (gmt 0)|
I just tried your solution to see but it did not work.
It returned www.mysite.com/index.php