Hello everybody I need to update some datas on a script placed on a shared hosting.
both scripts, access and destination are PHP files.
I need to access the external file trough a post operation, but server is responding me “501 Method not implemented “
I have tried also to put on top of the receiving file
header('Access-Control-Allow-Origin: *');
But I don’t solve it as probably is nginx the same stopping it before the php file is executed.
How could I tell nginx or apache to enable post only for this file ?
Thanks everybuddy
Nginx limit_except directive can restrict your script to only post requests –
http://wiki.nginx.org/HttpCoreModule#limit_except
This would give a 403 for anything other than POST, not a 501. So they must be doing something else.
As you say, PHP can do nothing about this. If your host is blocking post requests they probably have a good reason, so I’d ask them.