It worked .. it worked!! Thank you very much!!
I added the "use" thing had problem again.
The problem was with ftp, file was transferd from desktop to server in binary mode and some extra stuff was added after each line.
Thank you.
premature end of script headers" error, am I doing something wrong?
#!/usr/bin/perl
my $ua = LWP::UserAgent->new;
my $response = $ua->get(’http://www.xyz.com/shop/images/full.gif’);
print "Content-type: image/gif \n\n";
if ($response->is_success) {
print $response->content; # or...
I did something like this, but gives me "premature end of script headers"
Can u help?
#!/usr/bin/perl
open FH, "/shop/images/full.gif" or handle_error();
print "Content-type: image/gif\n\n";
while(<FH>) {
print;
}
close FH;
I am working on something to show image on a html page like this
<img src="http://www.mystite.com/CGI-BIN/photo.pl?photoid=100">
instead of
<img src="100.gif">
Has anybody done this before? Can somebody tell me how this is done
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.