Set a trip flare on your web or blog pages. Perlspy - installation guide.
January 2nd, 2008
Do you have web or blog pages that you want to set alarms on and be notified as soon as the page gets visited? Maybe they are secured pages or hidden pages that you want to keep an eye one. Do you want to be alerted if someone tries a brute force attack on your membership page? Do you want to know when Google has spidered your new blog post?
PerlSpy is a nifty little perl script written by a guy named Anas Elhalab that sends you an email alert the moment someone visits any “marked” page with all the info you need to know about that visitor. This information includes the page url they visited, their IP address, Host DNS, exact time of visit, the referring URL, the browser and so on.
You can easily “mark” those pages by inserting one line of HTML, or a few lines of javascript (you have a choice). The script does the rest.
The other neat thing is that it works on multiple pages across multiple domains. This means you can set it up once on one web site, but have trip-flares on pages on your other web sites.
Note that PerlSpy is not really a security system, it’s not a counter either. I think web page “trip-flare” is a nice way of describing it.
Its applications are countless and depend only on your imagination. We warned, don’t flood yourself with emails if you’re expecting millions of visitors.
To install it:
1. Download and unzip the code to your PC
2. Upload it to your cgi-bin directory
3. Check that the file permissions are set to 755
4. Create a subdirectory under cgi-bin called perlspy-data. Make sure the permissions of this directory are set to 777
5. Run the script from your web browser (http://youdomain.com.au/cgi-bin/perlspy.pl), and use the administration panel to set it all up. Note that you have to refresh the page to go to the next step. The only tricky bit is knowing where your sendmail program is located. In my case it was located at /usr/sbin/sendmail If you are running cPanel, the main login screen will give you this information.
6. Copy the html or javascript into the web pages that you are interested in.
The format of the html code to insert in your pages is:
<IMG src=”http://www.yourdomain.com.au/cgi-bin/perlspy.pl” WIDTH=”1″ HEIGHT=”1″>
The format of the javascript is:
<!– Start PerlSpy Code - Copyright Anas Elhalabi, Perlmart, http://perlmart.cjb.net –>
<script language=”JavaScript”>
<!–
document.write(”<img src=\”http://www.yourdomain.com.au/cgi-bin/perlspy.pl?referer=”);
document.write(escape(document.referrer));
document.write(”\” width=1 height=1>”);
// –>
</script>
<!– End PerlSpy Code - Copyright Anas Elhalabi, Perlmart, http://perlmart.cjb.net –>
That’s all there is to it. Below are screen shots of the administration panel. To see these clearly, just click on them.
Categories: SEO General, Web design |










good stuff
A very useful bit of code. It’s a good way of seeing how many visitors make it to the order page and don’t go ahead.