Simple Machines Community Forum

General Community => Scripting Help => Aiheen aloitti: netroact - tammikuu 27, 2008, 10:48:20 IP

Otsikko: Stats Script
Kirjoitti: netroact - tammikuu 27, 2008, 10:48:20 IP
I have a small little Perl stats script I run on all my websites. I use SSI. Is it possible for me to use that within the forum? I thought I could probably run it from the ad management content box, but it didn't work. I tried this:
<img src="http://somesite.com/cgi-bin/somescript.pl">

I really want to use this Perl script, but if it can't be done, I could code it in PHP ( extra work :'( ).

Any ideas would be appreciated.
Otsikko: Re: Stats Script
Kirjoitti: pkmnfrk - tammikuu 27, 2008, 10:56:12 IP
What does the script output? If it's an image, then it should work fine like that (pop it in template_html_below for best results).

If, for some reason, it outputs HTML (for, say, old-school SSI), then you may want to try including an iframe:

<iframe src="http://somesite.com/cgi-bin/somescript.pl"></iframe>
Otsikko: Re: Stats Script
Kirjoitti: netroact - tammikuu 27, 2008, 11:24:17 IP
Thank you for the quick reply!

It outputs an image, but it didn't work like I had it. I used the iframe and it worked, but the size is not formatted right. I didn't specifiy the size in the script output, because I thought the ad management would do that. I tried adding the width and height in the img src tag in the output of the script, but it didn't fix it.

Any ideas?

Otsikko: Re: Stats Script
Kirjoitti: pkmnfrk - tammikuu 27, 2008, 11:25:07 IP
Could you link the actual script, so I can see what it outputs? PM me if you wish to keep it private.

Edit: I mean, a link to the file, not the contents.
Otsikko: Re: Stats Script
Kirjoitti: netroact - tammikuu 27, 2008, 11:38:52 IP
PM sent
Otsikko: Re: Stats Script
Kirjoitti: pkmnfrk - tammikuu 28, 2008, 12:36:50 AP
Hmm, your problem is a bit... different than I expected, maybe someone else can help you.
Otsikko: Re: Stats Script
Kirjoitti: netroact - tammikuu 28, 2008, 12:41:10 AP
Well, thanks for giving it a shot. It almost worked.
Otsikko: Re: Stats Script
Kirjoitti: CmptrWz - tammikuu 28, 2008, 02:19:20 IP
Did you try the virtual command?

http://us.php.net/virtual
Otsikko: Re: Stats Script
Kirjoitti: netroact - tammikuu 28, 2008, 11:29:33 IP
I will study on that. Any examples would be appreciated. If I could use this to call my stats script in the background without an image, where could I put it?