0

I work in a company where we sent many offer newsletters a week.

When the offer time has passed we replace some of the images of the newsletter so that it is clear the offer has ended.

Lets say that we have an image of the product and of course it has a link to our website. Apart from changing the image with the word "Ended" , is it possible to disable the link as well?

I know it might not sound possible, but wondering if there is way.

Thanks for your time.

vaskort
  • 1,871
  • 1
  • 18
  • 27
  • Of course. Use a webserver and pass through the url, PHP can do this, but others too. Your url points not to the image itself, which is located in a htacess restricted area but to a php script which reads the file and outputs its contents as jpeg, etc. Other approach: If you are hotlinking the file, then run a cron job and delete it, or replace it with a "no longer available image/error site". See first approach: http://stackoverflow.com/questions/1851849/output-an-image-in-php (you will of course need some checking when to disable it) – Samuel Jul 07 '14 at 09:30
  • @Samuel Thanks for your time commenting. If I understand well this solution is only to replace the image but I want to change the href that comes with the image (. Besides that I think using script inside a newsletter is a guarantee spam email. – vaskort Jul 07 '14 at 10:11
  • You got me wrong. You can make an image href looking like this: `domain.com/imgs/foo.jpg`. But at this location there is no such image, instead a htacess rule lies in /imgs that redirects all traffic to your script "my_script.php" and appends the data, e.g. `domain.com/imgs/foo.jpg` is resolved to `domain.com/imgs/my_script?image=foo.jpg`. By this way you can run php code to check whether the image is valid, if true, then retrieve it from a save location, where only this script has access to (use htacess) and display it. No one knows that this is a php script. – Samuel Jul 07 '14 at 10:35
  • aha its more clear now, will get my hands dirty and come back for a feedback – vaskort Jul 07 '14 at 10:44

0 Answers0