TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 06-05-2010, 11:38 PM   #1 (permalink)
bajingo
 
skibbli's Avatar
 
Join Date: Feb 2010
Posts: 11
Thanks: 2
skibbli is on a distinguished road
Help How can i read an image from the inside of a php file

i want to be able to refer to an image on the INSIDE of a php file.

like this:

<img src=".?img=file.gif">

But. when i mean the INSIDE i mean the image data is literally included in the file, i know this is possible because ive seen it done in the c99 shell. i wasn't able to figure out exactly how they did it because the code is so complex
__________________
"Stealing! How could you? Haven't you learned anything from that guy who gives sermons at church? Captain what's-his-name?"
skibbli is offline  
Reply With Quote
Old 06-06-2010, 03:21 AM   #2 (permalink)
Wizard
Top Contributor 
 
Village Idiot's Avatar
 
Join Date: Sep 2007
Posts: 1,299
Thanks: 17
Village Idiot is on a distinguished road
Default

Quote:
Originally Posted by skibbli View Post
i want to be able to refer to an image on the INSIDE of a php file.

like this:

<img src=".?img=file.gif">

But. when i mean the INSIDE i mean the image data is literally included in the file, i know this is possible because ive seen it done in the c99 shell. i wasn't able to figure out exactly how they did it because the code is so complex
Use the header function to set the MIME type to the image type you are using, then print the file content using fopen and related functions.
__________________

Village Idiot is offline  
Reply With Quote
The Following User Says Thank You to Village Idiot For This Useful Post:
skibbli (06-06-2010)
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Image Reflections in PHP Rendair Advanced PHP Programming 17 11-30-2011 08:41 AM
How use PHP to read image files from a folder and display them in Flex 3 tilelist. chunL Absolute Beginners 12 07-13-2009 01:49 AM
mail problem galleeandfarel Absolute Beginners 10 02-10-2009 12:17 PM
Make Your Own PHP Flash Player Which You Can Pass a File Variable with Preview!!!! thegrayman Tips & Tricks 2 12-12-2007 12:44 AM
Uploading Files with PHP daz Absolute Beginners 3 09-30-2007 06:23 PM


All times are GMT. The time now is 07:23 PM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design