•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the PHP section within the Web Development category of DaniWeb, a massive community of 363,386 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,841 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our PHP advertiser: Lunarpages PHP Web Hosting
Views: 356 | Replies: 3 | Solved
![]() |
i am using php to upload images onto the server and then they are being displayed on other pages around the site. the problem i am having is if the user changes the images that they have uploaded the old ones are displaying from the cache.
i would like to know if it is possible to get the image from the server and then add a random number to it so that the cached images will always have a different number appended to the end of the file when of the image when displayed.
i dont want the random number stored with the file i only want it to be used when the file is being displayed.
i have tried to store the image with the random number and then post the variable holding this number to other pages from the image upload form but this has not worked. the variable is not getting posted so i can only get the rest of the file name when i look at the image properties.
i would like to know if it is possible to get the image from the server and then add a random number to it so that the cached images will always have a different number appended to the end of the file when of the image when displayed.
i dont want the random number stored with the file i only want it to be used when the file is being displayed.
i have tried to store the image with the random number and then post the variable holding this number to other pages from the image upload form but this has not worked. the variable is not getting posted so i can only get the rest of the file name when i look at the image properties.
Last edited by kevin wood : May 12th, 2008 at 9:59 am.
that is sort of what i have working now but the problem with this method is that i am storing my images on the server and for me to be able to display the image again i must know what the appended number will be for me to be able to display the image again.
if it was possible to store the image like myimage.gif and when it came to display the image then have it as myimage.gif.1234 so that when the image was cached i it should be cahced with the number attached to it.
the more i think about it and the more i research it the more i am starting to thing that this will not work.
if it was possible to store the image like myimage.gif and when it came to display the image then have it as myimage.gif.1234 so that when the image was cached i it should be cahced with the number attached to it.
the more i think about it and the more i research it the more i am starting to thing that this will not work.
![]() |
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
•
•
•
•
•
•
•
•
DaniWeb PHP Marketplace
Similar Threads
- Help needed filling array with unique random numbers (C++)
- C++ Random Numbers (C++)
- Random number generator freezing (VB.NET)
- A new question about adding and subtracting (Visual Basic 4 / 5 / 6)
- Random Double Generation With Precision? (C)
- Adding Random Numbers help (C++)
- Random number generator (Java)
- How to put the random integer between 1-100 into the 2 dimensions array (5x5 metrix) (C++)
- Adding RAM to HP Pavillion 8776C - odd problems? (Motherboards, CPUs and RAM)
Other Threads in the PHP Forum
- Previous Thread: set data to be value of variable
- Next Thread: Need Code help to open new tab



Linear Mode