PDA

View Full Version : Can this be done?



Christopher
April 24th, 2002, 20:58
Can you make a Perl script on your server, and then make the "results" be displayed on another server?

Example:
A counter script on your server and display how many page views on a non-perl server (off of your own)

Thanx

keith
April 24th, 2002, 21:34
<script src="http://www.blah.com/cgi-bin/counter.pl"></script>

Christopher
April 24th, 2002, 21:52
That easy? Thanx keith :D

keith
April 24th, 2002, 22:19
no prob. i'm thinking it'll only work with javascript enabled browsers though, which is still a pretty large percentage.

besides that, there's really no other options.

Dusty
April 24th, 2002, 22:41
In your example of a counter, you could have the script output and image and call it from the other server through an <img> tag.

keith
April 24th, 2002, 23:22
yeah, never thought of that. may work even better.

Christopher
May 14th, 2002, 20:20
Late reply but:

Can you give an example of an image tag the way you described above? Would it just be a normal tag with the src to the script? Like this:

<img src="http://www.blah.com/cgi-bin/counter.pl">

Dusty
May 14th, 2002, 20:33
Yes, just like that.

Christopher
May 14th, 2002, 20:57
Ok thanx Dusty!

Wouldn't matter if it was PHP right? Nevermind, it couldn't matter...

is0lized
May 14th, 2002, 22:58
<img src="http://www.blah.com/cgi-bin/counter.pl" height="1" width="1">

would work better

Dusty
May 14th, 2002, 23:04
Not if you intend to actually see the output, as is usually the case with a counter.