I'm trying to call a JPG file from within PHP (in an effort to hide the actual JPG folder). The image is supposed to be called at domain.com/photo/?id=X&i=Y where X is the gallery ID and Y is the image number, but it doesn't seem to be working. I've done this before but copying and pasting the code doesn't seem to be working. What am I missing?
Code: [Select] if (isset($_GET['id']) && isset($_GET['i'])) {
//get folder location of photos
$gallery_path = mhp_get_gallery_filepath($_GET['id']).'/';
//return filenames of all jpgs in folder
$imgs = (mhp_img_list($gallery_path));
//get name of i-th jpg file
$img = $imgs[(int) $_GET['i']];
//check to see if the image exists
if (file_exists($gallery_path.$img) && is_readable($gallery_path.$img) && getimagesize($gallery_path.$img)) {
header('Content-Type: image/jpeg');
$orgimage = imagecreatefromjpeg($gallery_path.$img);
imagejpeg($orgimage, NULL, 90);
imagedestroy($origimage);
}
}
PHP Include not working
The website is http://www.grlistingservices.comThe code block is as follows:<?phpif (!isset($id)){include 'home.php';}else{include "$id.php";}?>All files are in the same
Php Mysql Page Loading Notice
Hi all,I was wondering if there is a way (Sure there is) of showing a message or an image while a page is loading.The issue is that I have a big table and I'm running some queries against it.Obviously
I got my hosting suspended XD
So I saw this challenge a day or so agohttp://www.programming-challenges.com/pg.php?page=downloadproblem&probid=110101&format=htmlAnd I thought to myself "Well, what about numbers
Problem related to Creation of PDF File?
Hi All,
BSP Ext - tableView - Sort - NEWBIE
Hi,
RadioButtonList item spacing
I have a RadioButtonList and I can't put any spacing between the items. They are arranged vertically, and each one is right on top of the next.
Filtering Tables
Hello Thanks for any help any one can give Im very new to PHP..I need to pull data for clients that share 2 diff services into one table.mysql_select_db($database_pull, $pull);$query_Recordset1 =
SCO Unix
I know this might not be the place to ask, but, can anyone tell me if SCO Unix comes with PHP built in???
Need help in Generating Combinations
Need help generating all possible combination of names in an arrayLets say i have the following array:$names = array("jack","john","Adam","Mike");Now my goal is
error help - Dynamic Image
I've been working on making my site less cluttered in the directories and more secure lately. In an attempt to prevent bandwidth theft from other people using images, I decided to switch all my site