Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

 
 
Thread Tools Display Modes
Prev Previous Post in Thread   Next Post in Thread Next
Old Jan 4th, 2007, 3:51 PM   #11
PhilBon
Hobbyist Programmer
 
PhilBon's Avatar
 
Join Date: Nov 2005
Posts: 172
Rep Power: 4 PhilBon is on a distinguished road
Send a message via AIM to PhilBon Send a message via MSN to PhilBon
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.
PhilBon is offline   Reply With Quote
 

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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