Might there be a permissions issue between the two systems? PHP on another server box or same one with FMS? different domains and/or IPs? both HTTPS (or not?)
Security these days is more robust to prevent servers from talking to each other.
I don't think it is a permissions issue. I can hit the url from a browser on the server, it is just a hidden page on our website.
Your client will output your csv files to your documents folder, on the server it will output the files to a different location. Could that be the problem?
PSOS will output the files to a location that looks like c:/program files/FileMaker/FileMaker server/data/documents or similar if your server is on a Mac.
So check generic PSOS issue, do you use Go to Layout and Find Records for the first steps of script?
Did you check error code for the script?