Perl an dCGI

Im writing a basic script to capture the date, browser and refering URL and save them to a text file.

Unfortunatly the perl enviroment for HTTP_REFER gets the address of the page that called the script rather than the site the user found the link to my site on. Is there way to change this? Or is there a way to pass the real HTTP_REFFER to the CGI program?

Is it possible to pass SSI enviroment variables to a CGI program?

I could also do an autosubmitting form, but I dont want the visitors to be redirected to a page after it submits. This would be easy because I could simply use SSI echos and put them in HIdden form attributes. Is it possible to write a very basic form handler script that just saves the info ina text file without redirecting visiotrs?

Im pretty new to this so any help would be great.
 
Unfortunatly the perl enviroment for HTTP_REFER gets the address of the page that called the script rather than the site the user found the link to my site on. Is there way to change this? Or is there a way to pass the real HTTP_REFFER to the CGI program?
As far as I know, the page that called the script is the "real" HTTP_REFERER. But if you just want to get the user agent, date, and referer, you may want to see if your http daemon (or web hosting utils if you can't alter the httpd config) can log that data for you instead of invoking perl on every hit.
 
Back
Top