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 May 17th, 2000, 10:08 PM
gpolins gpolins is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 32 gpolins User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
My scenario is that I am trying to put an image on a page using php not on my server, that does not have php. I am using the tag <img src=http://myserver.com/asdf.php3> and asdf will a) read an image b) set a header("Content-type: image/gif") and c) echo the image. That works fine.
The problem is that I also wanted to include a link based on the image (ie - dynamic, involving php). After I set the header, regular tags are ignored and I can't echo anything before a header, nor can I set a different header.
SO my question is, does anyone know a workaround to this problem: like displaying an image on a non-server page, without setting a header, or a way to dynamical reference something? Any help is greatly appreciated and if you think you might be able to help, but don't understand my situation or need clarification, contact me.

PS - If it can't be done with PHP, can it be done with any other language anyone knows of?

Reply With Quote
  #2  
Old May 18th, 2000, 08:53 AM
Vinay Vinay is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 10 Vinay User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I see how you can set header, and send an image .. i dont understand what you mean by creating dynamic stuff ?..do you want to send an image with a text link ? .. elaborate please... how bout an HTML example of what you want to come and what your PHP script is ...

regards,
------------------
Kryogen WebHosting - powering dynamic content

Reply With Quote
  #3  
Old May 18th, 2000, 06:26 PM
gpolins gpolins is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2000
Posts: 32 gpolins User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 14
What I'm doing is using MySQL database to grab both the url for the image I want to grab and to grab a url for the link i want that image to be referenced to. my code goes something like this (psuedo-code)

get image from mysql
get url from mysql
use readfile to get image to a variable
set header
set start of <a href > tag
echo image
set end of </a> tag

What doesn't work is the href, because of the header. Thanks for responding and hopefully u can help.


Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesPHP Development > setting headers and echoing images

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