+ Reply to Thread
Results 1 to 6 of 6

Thread: Storing images in XML file - Part II - Displaying image

  1. #1
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    19
    Posts
    2,057
    Blog Entries
    13

    Storing images in XML file - Part II - Displaying image

    Last edited by Jaan; 06-08-2010 at 09:11 AM.

  2. #2
    Administrator Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan is a name known to all Jordan's Avatar
    Join Date
    Nov 2005
    Location
    Hendersonville, NC
    Posts
    24,750
    Blog Entries
    97

    Re: Storing images in XML file - Part II - Displaying image

    Retrieving it is fairly simple! Excellent Tutorial. +rep.

  3. #3
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    19
    Posts
    2,057
    Blog Entries
    13

    Re: Storing images in XML file - Part II - Displaying image

    Eheh.. thank you

  4. #4
    Code Slinger chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5 has a reputation beyond repute chili5's Avatar
    Join Date
    Mar 2008
    Posts
    7,042

    Re: Storing images in XML file - Part II - Displaying image

    Very nice! Why does the below code work to display the image?

    Code:
    echo base64_decode($xml->image[$num]->content);
    "Whenever you remember, I'll be there/
    Remember how we reached that dream together" - Carrie Underwood

  5. #5
    Moderator Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan is a splendid one to behold Jaan's Avatar
    Join Date
    Dec 2006
    Location
    Estonia
    Age
    19
    Posts
    2,057
    Blog Entries
    13

    Re: Storing images in XML file - Part II - Displaying image

    it's like..

    Code:
    <galley>
    	<image>
    		<title>My picture.jpg</title>
    		<type>image/jpeg</type>
    		<url>http://myimage.com/my_picture.jpg</url>
    	</image>
    	<image>
    		<title>My dog.jpg</title>
    		<type>image/jpeg</type>
    		<url>http://myimage.com/my_dog.jpg</url>
    	</image>
    	<image>
    		<title>My bike.jpg</title>
    		<type>image/jpeg</type>
    		<url>http://myimage.com/my_bike.jpg</url>
    	</image>
    </gallery>
    this is my XML and then I use PHP to get url to my bike's picture

    Code:
    echo $xml->image[2]->url
    and it prints http://myimage.com/my_bike.jpg

    this image[2] is like an array.. first element in array is 0 then it's 1 and 2 and so on..

    and in XML first <image></image> is 0.. and when i have third <image></image> then it's 2 in numbers

    I hope you understanded me because I'm really tired and my english sucks a koala

  6. #6
    Newbie Faizan is an unknown quantity at this point
    Join Date
    Jun 2010
    Posts
    1

    Post Re: Storing images in XML file - Part II - Displaying image

    how can we make a gallery ?. . with next and previous button n geting pictures fom xml. .?.. how can we do that ? plez tell me :S. .

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Tutorial: Storing Images in MySQL with PHP
    By Jordan in forum PHP Tutorials
    Replies: 47
    Last Post: 08-13-2010, 04:42 PM
  2. Replies: 174
    Last Post: 08-06-2010, 02:38 PM
  3. Linux/Bash: Check if a file exists
    By Tor in forum Shell Scripts
    Replies: 4
    Last Post: 07-10-2009, 10:28 AM
  4. Java: encrypt text into an image
    By Sinipull in forum Classes and Code Snippets
    Replies: 0
    Last Post: 06-16-2009, 12:59 PM
  5. scale image
    By bubuzzz in forum Java Help
    Replies: 3
    Last Post: 06-01-2009, 01:59 AM