I m building a mail parser script that will fetch content from a mail box
and send few “update” requests to the a WebPage backend(on Zend_Framework).
The idea is to have the mailChecker.php file stand alone and to call it with Cron Job.
All works good until I try call the update url:
file_get_content("http://mySite.com/update-item/id/1");
The framework redirects my request to the Login Form …
What would be the cleanest way fix this?
I don’t wont to edit too much the login functionality
Is there a way to skip the authentication check for specific request?
(security is not a big issue here)
Or a easy way to create a session for my stand alone script before I call the updates:
file_get_content(“http://mySite.com/easy-auth/admin/admin”);
Looking for a simple / ugly solution, I don’t wont to edit the current Authentication too much.
Why not to authenticate as you normally do prior to calling the update url? If there is a simple session based authentication, you could curl the login action passing login details and enabling cookie jar. And then curl again to get data from update script.
Another solution, if there are really NO security requirements, just disable authentication checks for incoming requests from localhost.