Image Display Doesnt Display The Entire Pic Just The $xhead Value.
i have this issue:
showpic.php
================================================
$ch = curl_init();
$timeout = 0;
curl_setopt ($ch, CURLOPT_URL, $xmyurl);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
// Getting binary data
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_BINARYTRANSFER, 1);
$image = curl_exec($ch);
curl_close($ch);
header('Content-type: image/png');
$xim=@imagecreatefromstring($image);
$xbase = @imagecreatetruecolor(130,168);
$xback=imagecolorallocate($xbase, 255,255,255); //green
imagefill($xbase,0,0,$xback);
$xhead=@imagecreatefrompng('xhead.png');
imagecopy($xbase,$xhead,10,0,0,0,108,28);
imagecopy($xbase,$xim,0, 28, 0, 0, 130,140);
imagepng($xbase);
================================================
then i have this code to display the pic:
echo'
<font color="#FF0000" size="4">Congratulations!!!</font><br>
<span style="font-weight: 400"><font size="2">
<font color="#000000">Here is your pic ;-)</font><br>
</font></span>
<img src="showpic.php?xurl='.$newurl.'">
'
the issue is, on my machine both on ie and ff the image display
perfectly.
however on some machines it doesnt display the entire pic just the
$xhead value.
View Complete Forum Thread with Replies
Related Forum Messages:
Use A Session It Doesnt Display Anything
I have an index.php page that I have a login form on. I have another page (login.php) that checks to see if the username and password is valid from my database. The login.php redirects them back to the index.php page. Instead of the login form, i want it to say something like hello <username>. someone told me to use sessions but every time i try to use a session it doesnt display anything. I dotn know if the variable is beign carried over or if its even possible to be carried over to a different php page. I have the start_session() thing on top of each of the pages. I define the $_SESSION['user'] variable on the login.php page but when i get redirected back, it doesnt have a value and its not showing up.
View Replies !
Display An Entire String
I have a form that allows a user to update their contact information in a mysql database. Some of the mysql records are strings with spaces, eg Address: 15 Some St. When I display the record on the form I get 15, everything after the space is not displayed. the HTML code for the form is: <td width="31%"><input name="Address" type="text" size="40" value=<?php echo $record['ResAddress'];?>></td> This has come from a mysql query which works fine. I just can't echo the entire string.
View Replies !
Display Entire Table And Edit
Is it possible with php to write a page to display and entire table into text boxes that will allow the user to edit the values in the text boxes and then click a single button to overwrite any changes? Currently I have the users using a formatted excel spreadsheet to modify the table entries but I would like to php it. I was going to use something like this, but I would prefer to be able to edit the table inline with the display rather than having the user have to select the line entry and edit it in a second page.
View Replies !
Resize Uploading *.gif Image For Image Display And Thumbnail
how to resize the uploading *. gif image...for display image size and thumbnail size...Okay I know how to do a uploading image...only for resizing part kind of lost it...because I find all tutorial not suit for what I look after..Ok the idea is.. when I upload image ..the php will resize the image into two type size and put into two folder "folder for images" and "folder for thumb" and size for all this type of image are...images = 100x100 thumb = 80x80 with same name file.
View Replies !
Image Array, Display One Image, With 'Next' Button
I need help building an array and have it display the $row[i] based on a $_GET variable number in the URL- I want to show one image from an album and have a 'NEXT' button so that I can cycle though all the images in that album. This is a very small/simple gallery, all images will be in one table as shown below. Code:
View Replies !
Display Of Image
how to display a small image in the browsers window where we are giving the url of the website. devforums too is having this.
View Replies !
PHP Image Display
Does anyone have a simple example script that will take an image filename as a query string argument and output the image without using HTML? So I don't want any <img src=""> calls in the PHP script.
View Replies !
Display Image Id
I currently have a script to display image,caption and description on a web page. (For example: http://www.mysite.com/showimage.php?id=1) I would like to display that url or the image information on a specific date on another web page, preferrably on a weekly basis. (For example: Display image id 1 on the week of the 12th of February, Sunday through Saturday; display image id 2 on the week of, etc.). Does any one have a script similar to my needs or know how to script it.
View Replies !
Display Image
I'm trying to modify a script that displays a picture. the problem is that the script gives to options to the users to select a picture, either by uploading the file or by using a url. this will display only the upoaded images: echo "<img src="uploaded/$image" />";
View Replies !
Display An Image
I have images stored in a MySQL table as blobs. How in the world can I load the images from MySQL into a web page, using for example <img src> tag. I assume the first thing I need to do is retrieve the image via a MySQL query: $sql = "SELECT myImage FROM images WHERE id = 1"; $result = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_object($result); //Now what do I with this to display the image? $row->myImage
View Replies !
Image Display
how to display images from a mysql database using php. The code below displays the binary information for the image rather than the image itself. Does anyone have any idea what I'm doing wrong? Code:
View Replies !
How Do You Display A Message If There Is No Image Please
I use the code: echo "<img src="newsimages/$five">"; to display an image taken from the database. So if there is an image the HTML becomes <img src="newsimages/testpic.gif"> or whatever. But if a record does not have an image, then it displays: <img src="newsimages/"> which just brings up the missing image red cross. How can I display a message saying there is no image if there isn't one?
View Replies !
Image Upload And Display
I successfully uploaded an image onto Mysql (I'm using PHP 4.2.1, APACHE 1.3.26 and mysql). At least I don't get any errors and when I check the table there is an entry. The image is a jpeg file of size 10kb. But when I run the php script to display the image, it runs without errors but the iamge displayed is not visible. It has a 'x' in red at the center and a small box. I would presume the image didn't go in properly or I have to resize it while getting back!!!! I have no clue.
View Replies !
Display Image Graph In Php?
I have used a third party graph script to create some nice bar graphs of my website statistics. Only problem is I can only get it to show in its own window, not from another php page... so its not much use own its own, I want it to show up a part of other thing son my page.
View Replies !
PHP Image Upload And Display
I am a PHP Developer.can any one help me on image upload and display of that image.what i want is uploading an image to a directory ,displaying of that image as a thumbnail.when i click on that image the image should be diplayed in another page. I wrote code for image uploading and as well as display code.but i failed in image resizing when click on that :( can anyone come up with code for this , asap.Otherwise suggest me a way how to get this.
View Replies !
Cant Get An Image To Display On Another Server
i cant get an image to display on another server though it does on mine. Here is the code for the page. The problem i think is the imagettftext function particularly the reference to my font file "Verdana". If i use a different function to write text it does so no bother but unfortunately i need this function to work. Here is the error it outputs followed by the code for the page in question: <?php // Define .PNG image header("Content-type: image/png"); $imgWidth=575; $imgHeight=175; // Create image and define colors $image=imagecreate($imgWidth, $imgHeight); $colorWhite=imagecolorallocate($image, 255, 255, 255); $colorRed=imagecolorallocate($image, 255, 0, 0); //label y axis imagettftext($image, 7, 0, 22, 110, $colorRed, 'Verdana', 'results'); //this should output the word results // Output graph and clear image from memory imagepng($image); imagedestroy($image); ?> //the font file is definitely in the same directory
View Replies !
How To Display Image In Php Page
Looking for code for displaying image in .php3 page. I have tried this but not working. <img src="$picture" width="312" height="50" alt="$picture (83 bytes)"> where $picture ids a image file name i am getting form mysql database.
View Replies !
Display Image On Email
I have just been playing around with using forms and sending out html email but I would like to add an image to the top of every mail sent out. How do I do this? I have tried using: Content-Type: image/gif; name="orbitlogo1.gif" in the headers but this just displays the box with the red x when you get the email.
View Replies !
Display Image Tooltips Using Php
I'm trying to have my script pull images and tooltips for them from a table. I have succeded in that aspect. But for some reason it only displays everything up until the first space in the text string. For example, the tooltip for one image is "golf tourney 07", but when I mouseover the image it only displays "golf". Any ideas?
View Replies !
Display Image From Other Server
I am making a website for which i need lots images. but i cannot affor for large space in server. so i am thinking about using images from other sites. i have to upload all other images by myself, but in case of books, i would like to display from other server when i provide isbn no of the book.
View Replies !
How To Display Image In Row Wise
i want to display image in client side what i insert from admin area Example if i entered 10 records in admin area it should display in client side like 1 2 3 4 5 6 7 8 9 10 how should i write a code for this one.
View Replies !
Image Display From Database
i have one problem in my programming.there is a table containing some details of the product with its image.. in view section in my php page ,i need to show this image and the rest of the fields in the table in a row...
View Replies !
Display Image Depending On Url
I am a complete newby to php and Im trying to learn how to do something, here is what im trying to achieve. something like: if url="page1.php" then print("<img src="image1.gif" alt="image1">"); if url="page2.php" then print("<img src="image2.gif" alt="image2">"); if url="page3.php" then print("<img src="image3.gif" alt="image3">"); I know its wrong but you get the idea. Ive searched around google etc for some kind of example but I can't find anything, can anyone help me go in the right direction?
View Replies !
Display A Default Image?
Is there an "if" statement I can use to check if an image exists in a certain directory, and if it does display it, but if it doesn't exist then display another image in a different directory? I've written simple "if" statements for text display, but nothing like this. Is this possible? It might help to tell the scenario. I am putting together templates for teacher web sites. If they wish, they can upload their own logo into their upload directory to display at the top of the page, but if they choose not to upload their own logo I want the default (district) logo to appear there. The default logo is located in another directory on the same server.
View Replies !
Display Random Image
i have code to display an image in 1 directory, does anyone have something that will search all sub dirs within the root tree say main humor weird etc but it will scan them all, i have about 80 sub dirs, i dont wanna put in an array.
View Replies !
Image Display Issues
I am trying to create a system for displaying images dynamicly, below is the code I have so far: <?php $custid=$_REQUEST['custid']; $img=imagecreatefromjpeg("logos/$custid.jpg"); imagejpeg($img); imagedestroy($img); ?> I'm not exactly sure why it is simply displaying garbled code when I try to test this. Could someone please show me where i've run off the tracks.
View Replies !
Display Text Along With The Image
I am doing some work on one php page that is generating an array. Then I need to pass that array to a second page that then uses the info from that array to output an image. However I would like to display text along with the image, so someone told me I needed to include the following line in the page with the outputted text: <img src="image.php/id=$imagenr">. But if I do that, how do I pass the variables to image.php?
View Replies !
Image Display - .gif Files
Over the past few weeks i've been teaching myself PHP and MySQL, now ebbing on the completion of my first major project. I have a database that contains a list of customers and students for each of those customers. On the main page of the site i have a Alphabetical list of all the Sudents, when you select the student it then opens there profile which contains more detailed information. One piece of information is the completion date for the candidates course. I would like to have iether a Red or Green flag displayed next to the candidates name in the initial list dependant on whether a date has been entered into that field, we can then determine from the full list which students have left us and which are still current. i have two .gif files for the flags.
View Replies !
Image To Display On Page
how I can display an image from my mySQL table on my website. I've heard that its a bad idea to have it in my database and I've heard that theres a better way but they don't show how to do it.
View Replies !
How Can I Display A HTML Doc As An Image
When i print the page with a javascript print link, it prints but i loose Table background image. I will be generating the HTML via a cgi script. The $title, $desc and always be different. The entire Background is 1 image. I have seen sites the want to sell you a form, and they generate it as a image. Is there another way to do this, or, is a PHP script what i need?
View Replies !
How Can I Display An Image W/ Php Only If It Exists?
How can I display an image w/ php only if it exists? I tried the file_exist function, but I do it sensed that the file existed everytime. the images are uploaded via a user, and the image is placed in a folder called propertyimages and the image name is placed in a table called image1 inside of a database. then when it comes time for them to be displayed, I am connecting to the database and using the following script to show the image: <? echo '<img src="propertyimages/'.$row_Rs['imageone'].'" height="200" width="200" vspace="10" hspace="10" >' ?> now how can I alter this so that it will only show if it actually exists? this is the file_exist function I used: $filename = 'propertyimages/'.$_row_Rs['imageone'];............
View Replies !
Display A Image For Afternoon
i want to display a image for good morning, good afternoon and good evening based on the time. cant find a script that does this as they all just deal with echoing text rather than a image. if anyone knows of a script for this could you help me out?
View Replies !
Display Image Uploaded
I know how to display the image by typing the image path in XHTML like: " img src='images/uploadedfile.jpeg' ". I want php to figure out what file i just uploaded and display it dynamically. In example, add that image to my existing product page. Anyone knows any similar tutorial or example?
View Replies !
Display Image Within If/else Statement
I have an image path delared in a variable $img= "<img src='icons/apo.gif' width='15' height='17' alt='airportindicator'>"; and I only want the image to display if a condition is met in a MySQL row which has a value of [10]. I have tried: if ( $row[10] == 1 ) { echo "<td>$img</td>"; } else { echo "<td></td>"; } but I believe the syntax is wrong. If the condition is not met, I want a blank value within the html <td></td>
View Replies !
Manage Image Display
I'm in the process of creating a classified script and working on adding images to the buy and sell part of the script. I added a few test images in a table and they all seem kind crushed or distorted. no image management script is applied to these images and i'm assuming i need to do this to control the the way image is displayed. How do i control the size/shape of the images being uploaded. how do i control how the image is displayed in terms of hight and width without the image getting distorted. could use some ideas and maybe php scripts that manage the upload and the display.
View Replies !
If Date Display Image...
Can someone point me to a php snippet I can use to display an image for certain dates. Example: If date Jan 1 show HappyNewYear.gif If date Sep 11 show 9-11_Memorial.gif If date Dec 25 show Christmas.gif
View Replies !
Display Image From Stored Url?
I want to use php to display an image and have the image url stored in my database, but the code I'm using simply displays the text content of the field ie the image url and not the image itself. Code:
View Replies !
How Do I Display An Image Only If It Exists
How can I display an image w/ php only if it exists. the images are uploaded via a user, and the image is placed in a folder called propertyimages and the image name is placed in a table called image1 inside of a database. then when it comes time for them to be displayed, I am connecting to the database and using the following script to show the image: <? echo '<img src="propertyimages/'.$row_Rs['imageone'].'" height="200" width="200" vspace="10" hspace="10" >'; ?> now how can I alter this so that it will only show if it actually exists?
View Replies !
Image Display Problem
I have problem with images not displaying. One page where I enter data and images displays properly, the other page which is the same database with has no edit rights displays text but no images, the image folder is in the other folder but I changed the $Translation["ImageFolder"] = "./images/"; Code:
View Replies !
Display Webpage As Image?
is there a way to include a .php page as an image file? <img src="http://webpage.ext/file.php" /> ? or a way to write a script that will return a webpage as an image file?
View Replies !
Upload And Display An Image
i've got some problems in displaying the image from the database.my page already can upload the image/picture into database but couldn't display it..hope anyone can help me because this is urgent matter..i have to submit it in 2 days time here is my coding: Code:
View Replies !
Display Non-existing Image
if(!empty($a1[image])) { $im_array = explode("|", $a1[image]); $FirstImage = "<img src="re_images/$im_array[0]" width=250 height=200>"; $FirstImage1 = "<img src="re_images/$im_array[0]" width=30 height=20>"; $FirstImage2 = "<img src="re_images/$im_array[1]" width=30 height=20>"; $FirstImage3 = "<img src="re_images/$im_array[2]" width=30 height=20>"; $FirstImage4 = "<img src="re_images/$im_array[3]" width=30 height=20>"; $FirstImage5 = "<img src="re_images/$im_array[4]" width=30 height=20>";</a>
View Replies !
Display A Chosen Image
how to display a chosen image if an user forgets other information in a form. For regular input fields I use Code: <input name="checkEmail" type="text" value="<?php echo $_POST['checkEmail'];?>" maxlength="255" /> But for an image upload this doesn't work Code: <input type="file" name="photo" id="file" value="<?php echo $_POST['photo'];?>"/>
View Replies !
Display Alternate Image
The goal is to display the users photo if one is found and if no photo is found then show the default "blankImage" if no image was found. The below displays both the blank image and the users image if an image is found. Code:
View Replies !
Display An Image In A Particular Directory
I have coded the following program where it selects an image name from mysql database and then goes on to print the image from that particular directory.Well,it selects the image name correctly and the query works perfectly. But I am not able to display the image from that particular directory.By the way,the image in the specified directory staff is an uploaded image.Please let me know why the image is not being displayed. Code:
View Replies !
Php Code For Image Upload And Display
Can any one give me code for logging in, image upload to a particual folder, add text and log out. Once I log out the image and text should display on my browser. I know most of the process, but the problem is i can't seem to get the file upload to a particular folder.
View Replies !
Display One Image At A Time + Prev/next
Have 10 images named pic1.jpg, pic2.jpg, ect.. Display one image at a time. If the image is pic1 there should also be a 'next' button. From pic2 there should be a 'prev' and 'next button until pic 10 where only a 'prev' button is present. I'm guessing the way to work this is to increment or decrement a variable and pass it to the next page depending on which button is pressed. And from that variable tell which image to include.
View Replies !
|