![]() |
|
|
|
Thread Tools | Display Modes |
|
|
|
|
#11 |
|
Hobbyist Programmer
|
Here is an update: getimage.php
[php] <?php $path = "/home/philbon/public_html/pictures/" . $_REQUEST['id'] . ".jpg"; //$path = $_SERVER["DOCUMENT_ROOT"] . "/pictures/" . $_REQUEST['id'] . ".jpg"; header("Content-type: image/jpeg"); $fo = fopen($path, "r"); $img = fread($fo, filesize($path)); echo $img; ?> [/php] Here is a different version: getimagetn.php [php] <? $id = $_REQUEST['id']; header('Content-Type: image/jpeg'); echo file_get_contents("/home/philbon/public_html/pictures/tn/" . $id . ".jpg"); ?> [/php] Once again here is what is code for the site: [html] Programming Forums: The image tag is right under this:<br /> <img src="http://www.philbon.com/getimage.php?id=3" /><br /> <img src="http://www.philbon.com/getimagetn.php?id=3" /> [/html] Here are some links: http://lucy.philbon.com/ or http://philbon.com/lucy/ Webpage I'm wanting the pictures to be displayed on. http://www.philbon.com/getimagetn.php?id=3 file that is supposed to return the thumbnail of the image. http://www.philbon.com/getimage.php?id=3 file that is supposed to return the image. http://www.philbon.com/pictures/3.jpg Large image http://www.philbon.com/pictures/tn/3.jpg Thumbnail image @titaniumdecoy: Alright I've changed that so they are all relative. Even with the change I can't seem to get it to work @Pizentios: The reason I want to use the middle man is because the script will later be turned into one that would be used for different users or different areas of a website. For example I have Philbon.com and then I have Web.PhilBon.com and Lucy.PhilBon.com, what will happen is to set it up where I don't have to put in all the different image links: philbon.com/images/ or lucy.philbon.com/images, but they can be stored in one location with a database back end to help manage them all. Another would be like for different photo albums, I can have one main page that gathers images from different areas of the site just by having one main link. |
|
|
|
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| OnlineTextEditor.Com! | Sane | Show Off Your Open Source Projects | 43 | Jun 16th, 2006 9:55 AM |
| outputting to a file to create a image | funkymp | C | 0 | Jan 16th, 2006 3:00 PM |
| After execution - Error cannot locate /Skin File? | wchar | Visual Basic | 1 | Mar 5th, 2005 10:04 PM |
| airport Log program using 3D linked List : problem reading from file | gemini_shooter | C++ | 0 | Mar 2nd, 2005 5:12 PM |