PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I am working with another development team on a cross domain API project. I need to check if a login passes or fails. The API they gave me takes the username and password as post variables, and returns XML output with the data I need, or an error if the login fails.
What I need to do is post the login, and check the results it returns to see if the login passes or fails.
How can I post variables to this page, and be able to parse the returned value? My thoughts are XMLhttpRequest, similar to how you would do an AJAX request.
We resolved the issue by switching from POST to GET. then using file_get_contents(), but I would still like to know how to do this using POST, for curiosity.
That's why I put quotes around 'easiest', for most people it is more difficult to install the CURL package then it would be to pick up some basic socket knowledge, plus sockets are just plain cooler :-p (not to mention more portable)