PHP Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesPHP Development

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:
  #1  
Old June 19th, 2000, 02:23 AM
jdma79 jdma79 is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 20 jdma79 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to jdma79
can any body help me how can i build a php file which can be called with <img src= > tag . this PHP file may or may not produce any picture....

Reply With Quote
  #2  
Old June 19th, 2000, 02:28 AM
Ramon Ramon is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 1999
Location: Helden,Limburg,The Netherlands
Posts: 33 Ramon User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
You can just enter the URL to the php file but the return value can not be shown in the browser, not even when it is a picture. So you need to make the picture a 1X1 pixel-picture so it does not show.

If you want a new picture that you can't hardcode in advance to appear you have to use a frame.

------------------
Ramon Litjens
Boradoli Web Design
(www.boradoli.nl)

Reply With Quote
  #3  
Old June 20th, 2000, 10:49 PM
Sepodati's Avatar
Sepodati Sepodati is offline
Banned (not really)
Dev Shed God 20th Plane (14500 - 14999 posts)
 
Join Date: Dec 1999
Location: Brussels, Belgium
Posts: 14,630 Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)Sepodati User rank is General 51st Grade (Above 100000 Reputation Level)  Folding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced FolderFolding Points: 97169 Folding Title: Advanced Folder
Time spent in forums: 3 Months 6 Days 2 h 55 m 52 sec
Reputation Power: 4408
Send a message via ICQ to Sepodati Send a message via Yahoo to Sepodati
I would think it would have to return an image, otherwise you'll get that broken link picture. if you make it 1x1 pixels, that would kind of hide it. I'm curious why you would want to call a php file from the src tag of an img? can you share anymore info?

to call the file, use
<img src="button.php3?text">

From the php manual of what button.php3 could look like:

1
2 <?php
3 Header("Content-type: image/gif");
4 $string=implode($argv," ");
5 $im = imagecreatefromgif("images/button1.gif");
6 $orange = ImageColorAllocate($im, 220, 210, 60);
7 $px = (imagesx($im)-7.5*strlen($string))/2;
8 ImageString ($im,3,$px,9,$string,$orange);
9 ImageGif($im);
10 ImageDestroy($im);
11 ?>
12

---John Holmes

Reply With Quote
  #4  
Old June 20th, 2000, 11:16 PM
Shiju Rajan's Avatar
Shiju Rajan Shiju Rajan is offline
.Net Developer
Dev Shed Novice (500 - 999 posts)
 
Join Date: Feb 2000
Location: London
Posts: 987 Shiju Rajan User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 3 h 26 m 22 sec
Reputation Power: 14
Send a message via MSN to Shiju Rajan Send a message via Yahoo to Shiju Rajan

I would think it would have to return an image, otherwise you'll get that broken link picture.

yea,It should return an image...

------------------
SR -
shiju.dreamcenter.net

"The fear of the LORD is the beginning of knowledge..."

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > how to call PHP file with img Src= tag ??

Developer Shed Advertisers and Affiliates



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 | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap