Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > need help with this little perl script

Reply
Thread Tools

need help with this little perl script

 
 
Danny
Guest
Posts: n/a
 
      02-09-2004
this originally used the FLY executable to generate a graphical counter
which used to be ok but my server disabled the executiuon of binaries, so
now I just want the script to do what it does (update the counter.txt) and
not do any FLY stuff. I just need something returned to the calling .html,
I guess a blank graphic would do. But how do you do the below, so the html
will call the counter script and have something returned.
This part of the script doesnt work

# $output = `$flyprog -i $fly_temp`;
#$output = `blank.gif`';
print "Content-type: image/gif\n\n";
print "<img src=\"images\/blank.jpg\">";

original code was:
$output = `$flyprog -i $fly_temp`;
print "Content-type: image/gif\n\n";
print "$output";


 
Reply With Quote
 
 
 
 
gnari
Guest
Posts: n/a
 
      02-09-2004
"Danny" <(E-Mail Removed)> wrote in message
news:5NGVb.51406$(E-Mail Removed). net...
> this originally used the FLY executable to generate a graphical counter
> which used to be ok but my server disabled the executiuon of binaries, so
> now I just want the script to do what it does (update the counter.txt) and
> not do any FLY stuff. I just need something returned to the calling

..html,
> I guess a blank graphic would do. But how do you do the below, so the

html
> will call the counter script and have something returned.
> This part of the script doesnt work
>
> # $output = `$flyprog -i $fly_temp`;
> #$output = `blank.gif`';
> print "Content-type: image/gif\n\n";
> print "<img src=\"images\/blank.jpg\">";


this is not a HTML newsgroup but i can tell you that images do not contain
HTML tags

>
> original code was:
> $output = `$flyprog -i $fly_temp`;


just replace this line with some code that reads the blank
graphic into $output. if any graphics libraries like Image::Magick
are installed, you could generate your own image here.

> print "Content-type: image/gif\n\n";
> print "$output";






 
Reply With Quote
 
 
 
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      02-09-2004
Danny wrote:
> this originally used the FLY executable to generate a graphical
> counter which used to be ok but my server disabled the executiuon
> of binaries, so now I just want the script to do what it does
> (update the counter.txt) and not do any FLY stuff. I just need
> something returned to the calling .html, I guess a blank graphic
> would do. But how do you do the below, so the html will call the
> counter script and have something returned. This part of the script
> doesnt work
>
> # $output = `$flyprog -i $fly_temp`;
> #$output = `blank.gif`';
> print "Content-type: image/gif\n\n";
> print "<img src=\"images\/blank.jpg\">";
>
> original code was:
> $output = `$flyprog -i $fly_temp`;
> print "Content-type: image/gif\n\n";
> print "$output";


If what you want is running the script without displaying anything,
you don't need to bother with a blank image, but you can just do:

print "Status: 204 No Content\n\n";

Or if you want to convert the script to a text based counter, you can do:

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

(or whatever the name of the variable is that contains the hits).

HTH

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl

 
Reply With Quote
 
Ben Morrow
Guest
Posts: n/a
 
      02-09-2004

"Danny" <(E-Mail Removed)> wrote:
> now I just want the script to do what it does (update the
> counter.txt)


Have you read perldoc -q "increment the number" ?

Ben

--
don't get my sympathy hanging out the 15th floor. you've changed the locks 3
times, he still comes reeling though the door, and soon he'll get to you, teach
you how to get to purest hell. you do it to yourself and that's what really
hurts is you do it to yourself just you, you and noone else * http://www.velocityreviews.com/forums/(E-Mail Removed)
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
1 little 2 little 3 little Kennedys dale Digital Photography 0 03-23-2008 01:03 PM
problem calling perl script from SOAP server perl script pj Perl Misc 3 04-09-2004 10:23 PM
Perl Help - Windows Perl script accessing a Unix perl Script dpackwood Perl 3 09-30-2003 02:56 AM
im a total NEWB i need a little help understanding this script..specific instances are noted. nightsaber Javascript 1 07-17-2003 04:46 PM
How to make Perl Script "POST" call from another Perl Script??? Wet Basement Perl 1 07-15-2003 10:25 PM



Advertisments