Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CGI to render image?

Status
Not open for further replies.

bitbrain

Programmer
Jun 10, 1999
159
US
My isp has a counter utility that is called from the image tag as follows:<br>
<br>
&lt;img SRC=&quot;/cgi-bin/Count.cgi?name=pack86&font=E&quot; align=BOTTOM&gt;<br>
<br>
I want to be able to do the same type of thing. That is, have a CGI that returns a jpeg file.<br>
<br>
Any ideas?<br>
<br>
Thanks in advance!
 
FYI - I figured out how to do it.<br>
<br>
html tag:<br>
<br>
&lt;IMG SRC=&quot;get_image.cgi&quot;&gt;<br>
<br>
CGI:<br>
<br>
#!/usr/bin/perl<br>
print &quot;Content-type:image/jpeg\n\n&quot;; <br>
...<br>
binmode STDOUT;<br>
print $image; <br>
<br>
<br>
where $image is the binary image.<br>
<br>
It worked!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top