I'm trying to login into a website and then downloading a .csv file using cUrl. I have open_basedir set to my web dir.
The problem is that when i run my code i get this error:
Warning: curl_setopt() [function.curl-setopt]: CURLOPT_FOLLOWLOCATION cannot be activated when safe_mode is enabled or an open_basedir is set
So im trying to find an alternative to this and searching around i found this: curl follow location error but that doesnt help me.
What happens (according to some output set around the code) is that i get a first 302 (which is the login redirect to the secure area home page) and then when i try to ask for the .csv it looks like that i'm not logged in.
I tested the code in my local env (with followlocation enabled and working) and everything works just fine. I tried to manually handle the response code and if 302 is found force a new curl call on the secure area home page but even so it doesn't work when i try to get the file.
Hope this was clear enought...