I'm developing a website project using PHP, and the http request code
I have for getting authorization from the AMEE database is:
$header = POST /auth HTTP/1.0\nAccept: application/xml\nHost:
http://stage.co2.dgen.net\nContent-Type: application/x-www-form-
urlencoded\nContent-Length: 36\n\nusername=/**username**/&password=/
**password**/;
$s = socket_create(AF_INET, SOCK_STREAM, 0);
$z = socket_connect($s, "193.34.29.200", $port);
socket_write($s, $header, strlen($header));
I got this code from the php with sockets example in the developers
area of the AMEE website.
This code is creating the connection between my website and the AMEE
website, but the http request above is causing a 400 bad request
error.
How do I change this code to get the authorisation token from the AMEE
website?
Thanks,
J.J.