Beginner Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOtherBeginner Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Stop making mediocre tutorials.The best tutorials are video! Camtasia Studio makes it easy to create engaging, buzz-building screen videos at any size, in any popular format. Download the free trial!
  #1  
Old October 28th, 2002, 05:48 PM
jimmy2k1 jimmy2k1 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Mar 2002
Posts: 89 jimmy2k1 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 8 h 48 m 50 sec
Reputation Power: 7
Help with making script output right content type

Ok I'll try to explain what I want here, I'll give an example of what I want, say you have a site with a picture on it like <img src="http://blabla.com/a.jpg"> but instead of having a link to that image, you want to have a like to a script (php, cgi, py) whatever, and that script stills makes the "img" tag print the picture. My question is how does that script output the right info for the "img" tag so that <img src="http://blabla.com/a.php"> still prints an image. I saw a CGI script of this that does this and I tried to re-create it in other scripting languages but it doesn't work because I don't know what to make the script output. I tried making print out the link of the image but when I put the script link into the image tag all it returns is a red X. I hope I explained this right. thanks for any help.

Reply With Quote
  #2  
Old October 28th, 2002, 10:52 PM
bricker42 bricker42 is offline
Moderator =(8^(|)
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Feb 2002
Location: Sacramento, CA
Posts: 1,710 bricker42 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 20 m 38 sec
Reputation Power: 8
Send a message via AIM to bricker42
Well, you'll need to set a content type header:

header ("Content-type: image/jpeg");

Here's an interesting script. It generates a barcode.

http://www.hotscripts.com/Detailed/7376.html

Cool thing though, you can pass it query string parameters . <IMG SRC="barcode.php?barcode=123456&width=320&height=200">
__________________
-james

Reply With Quote
Reply

Viewing: Dev Shed ForumsOtherBeginner Programming > Help with making script output right content type


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway