1

I am new to php and want generate url from image id in database. I have some images in my mysql-database associated with random id eg 546ae8c6b9f9a. I want to show all images related to that image if someone visit the page www.mysite.com/546ae8c6b9f9a. Simular to this url http://sv.tinypic.com/r/v2sak3/8

How can I do that when 546ae8c6b9f9a is not a directory or real file, just a reference to which images I want to show from the database?

Xtreme
  • 1,601
  • 7
  • 27
  • 59
  • 1
    you have image details in DB along with image id right ? Use that to retrieve image – Dimag Kharab Nov 18 '14 at 06:51
  • @CodingAnt is correct. You need to use some .htaccess rules so that when user comes to url www.mysite.com/546ae8c6b9f9a, you should pass '546ae8c6b9f9a' as a parameter and depending upon that parameter, you can show the image. – Pupil Nov 18 '14 at 06:56

1 Answers1

0

You can try below Url. They might be helpful for you.

Solution to retrieve image directly

Solution to retrieve image via Url

Community
  • 1
  • 1
Ashish Sapkale
  • 540
  • 2
  • 13