Is it possible to pass through an image file from a remote URL, without downloading it to the local server?
I have a PHP script that tracks stats and then outputs an image via readfile(). Example:
I'd like to use a CDN to reduce load, and take advantage of geo-location services to serve images faster. So, the script needs to output the image straight from the CDN and not download it to the local server for output.
Any advice on how to achieve this? Is it possible? Thanks in advance!
Do your tracking, but send the browser to the real location afterwards.
<?php header("HTTP/1.0 303 See Other"); header("Location: %the real uri%");
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki