I\'m running into a rather strange issue.
I\'m trying to log into a remote moodle install using curl from PHP.
I have a curl command, which works perfectly in th
I suspect your first attempt using the curl command is using the GET method in the index.php file. I suggest you enable --trace-ascii
on your first curl request in the command line and see whether a GET request is being made by the page or not. If yes, you should change your PHP script which is using the POST method. If you change the CURLOPT_POST to false, the PHP script should work.