I’m making a social network which is located at http://studnet.x10.bz. To make a long essay short, I have a users folder located in public html which contains users, their pictures, and pretty much all the data on their accounts. For undisclosed reasons, I cannot move the folder out of public html. If it would help, I am using x10hosting.
Now, I have an img tag which reads the picture from the folder. When it attempts to load, it needs auth verification. Obviously I can’t give it to anyone. (What’s the point there?) Does anyone know how I can access it without triggering an auth request?
One approach would be to create a PHP wrapper script in a non-protected area. This would then either make a CURL request specifying authentication options, or directly access the filesystem, and serve up the data.
This assumes you either have local filesystem permissions to read the image, or authentication tokens you can use for curl access.