This is driving me bonkers. I'm trying to create a simple pixel to place on an advertisers page so I can track conversions.
Here's what I've got so far:
When you load SiteA's page, it loads that "image" which causes .htaccess to redirect to the PHP script which then does it's thing.
Here's the PHP script I wrote:
So, it's writing the new lines to the file, but not the Query String.
If the image is on a page with any kind of query string, shouldn't it pick that up?
Is this due to the use of $_SERVER instead of something else?
Also, if someone could point me to a good web bug resource with script samples, that would be fan-fucking-tastic.
Here's what I've got so far:
- .htaccess setup to redirect /images/pixel.gif to my php script
- PHP script that is supposed to capture certain information and write it to a text file
- text file to keep the data
- .htaccess is doing it's job
- php script is writing to the file
- capturing ANY information from the page.
Code:
<img src="http://www.SiteB.com/images/pixel.gif" alt=" " />
Here's the PHP script I wrote:
Code:
<?php
$qs = $_SERVER['QUERY_STRING'];
$myFile = "test.txt";
$fh = fopen($myFile, 'a');
$stringData = "$qs\n\n";
fwrite($fh, $stringData);
fclose($fh);
?>
If the image is on a page with any kind of query string, shouldn't it pick that up?
Is this due to the use of $_SERVER instead of something else?
Also, if someone could point me to a good web bug resource with script samples, that would be fan-fucking-tastic.