Forum Moderators: DixonJones

Message Too Old, No Replies

Need PERL code for Click Counter

Using PERL Click Counter, need PERL

         

GunnerM

2:01 pm on Dec 14, 2003 (gmt 0)

10+ Year Member



IS IT POSSIBLE TO HAVE A NEW PROCESS STARTED FROM PERL?

I am using Freeware Perl code for a simple script called CLICK.CGI to track clicks. The link looks like this:

[domain.com...] link...

It did not have code for completing the link after the stats are recorded. I added the following code so that the link is printed on the screen. The code html code then tries to start the new link using JAVA. Here is the PERL code that I used:

$click_link = '<a href="' . $click_link . '">' . $click_link . '</a>';

print "Content-type: text/html\n\n";

print '<script language="JavaScript">';

print "setTimeout('".$java_link."', 0)";

print "</script>";

print "<br<br>Connecting to:<br><br>";

print '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="',$link,'"><b>',$link,'</b></a><br><br>';

print 'If your browser is not JAVA enabled, please click on link above.';

This code works well, but is clumsy, to say the least. I haven't been able to find a way to start the new "clicked on link" from withing the PERL code. Is it possible to start a new process from PERL. I have tried <!--#exec and can't get it to work with all of the different browsers.

IS THERE WAY TO DO IT WITHOUT USING PERL?

Thanks, GunnerM

GunnerM

4:14 pm on Dec 16, 2003 (gmt 0)

10+ Year Member



I found some code that works:

print "Location: $link \n\n";
print "URI: <$link>";
print "Content-type: text/html\r\n\r\n";

Where $link is the full path. Relative paths wouldn't work.

It works well with IE 6.1, but I haven't tested it from other browsers.

GunnerM