Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion PHP HTTP Request

View Parsed - Show only message text

Received: by 10.210.65.2 with SMTP id n2mr82124eba.5.1236972972226;
        Fri, 13 Mar 2009 12:36:12 -0700 (PDT)
Return-Path: <thade.ocon...@gmail.com>
Received: from mail-ew0-f170.google.com (mail-ew0-f170.google.com [209.85.219.170])
        by gmr-mx.google.com with ESMTP id 14si88331ewy.1.2009.03.13.12.36.11;
        Fri, 13 Mar 2009 12:36:11 -0700 (PDT)
Received-SPF: pass (google.com: domain of thade.ocon...@gmail.com designates 209.85.219.170 as permitted sender) client-ip=209.85.219.170;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of thade.ocon...@gmail.com designates 209.85.219.170 as permitted sender) smtp.mail=thade.ocon...@gmail.com; dkim=pass (test mode) header...@gmail.com
Received: by ewy18 with SMTP id 18so2678298ewy.25
        for <amee-developer@googlegroups.com>; Fri, 13 Mar 2009 12:36:11 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=gmail.com; s=gamma;
        h=domainkey-signature:mime-version:received:in-reply-to:references
         :date:message-id:subject:from:to:content-type;
        bh=XWe9E782nwMP7J5LCvtCheSjNDlcq+HE2ZU035IU97o=;
        b=f+YL3nmJzcVzYtPC9bBq2+T+kyRl3zckaPsWYg5XR7x0abHhRefOb33powxVkV7wu6
         fT1Jw/bsDFZDAv0PkkxTs8zPBGc+byetnBKVmO4+6H4AHr0IobaEiWixFoR/nMEMG5YD
         i8/rJqeJDTVl2fLoRiUvv543k0+qoT52DxAdQ=
DomainKey-Signature: a=rsa-sha1; c=nofws;
        d=gmail.com; s=gamma;
        h=mime-version:in-reply-to:references:date:message-id:subject:from:to
         :content-type;
        b=PpNRYrodniD2aWg14Ep1A47Di0PZcYQy/UzkZcajy8tzEoseDPaJbabR4SCJZ/NmCs
         SorGG2sZz0cNR0PFc9cyv2dSooFYAD6IqLEnLtjxApDdObix5moskXXni/OVT/vox15t
         4hh7D4A9ci8tezJroAXqOFbbej+ZJb2G7+xqk=
Mime-Version: 1.0
Content-Type: multipart/alternative;
	boundary="0016e6de17b28637ff046505361b"
Received: by 10.216.19.212 with SMTP id n62mr924207wen.66.1236972970850; Fri, 
	13 Mar 2009 12:36:10 -0700 (PDT)
In-Reply-To: <4637d8dd-84a0-4e81-a3e3-6ff10f5df265@h5g2000yqh.googlegroups.com>
References: <4637d8dd-84a0-4e81-a3e3-6ff10f5df265@h5g2000yqh.googlegroups.com>
Date: Fri, 13 Mar 2009 19:36:10 +0000
Message-ID: <e4ac36f0903131236k6eff37f2k508bd4c96c51c...@mail.gmail.com>
Subject: Re: [amee-developer] PHP HTTP Request
From: "Thade O'Connor" <thade.ocon...@gmail.com>
To: amee-developer@googlegroups.com

--0016e6de17b28637ff046505361b
Content-Type: text/plain; charset=ISO-8859-1

Hi J.J.

I tried that request, and got the same result as you.  This one works:

POST /auth HTTP/1.0
Accept: application/xml
Host: stage.co2.dgen.net
Content-Type: application/x-www-form-urlencoded
Content-Length: 35

username=********&password=********

the only difference is that the Host header is stage.co2.dgen.net rather
than http://stage.co2.dgen.net.

Regards,

Thade

2009/3/13 jj <jjshea...@gmail.com>

>
> 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.
> >
>

--0016e6de17b28637ff046505361b
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi J.J.<br><br>I tried that request, and got the same result as you.=A0 Thi=
s one works:<br><br>POST /auth HTTP/1.0<br>Accept: application/xml<br>Host:=
 <a href=3D"http://stage.co2.dgen.net">stage.co2.dgen.net</a><br>Content-Ty=
pe: application/x-www-form-urlencoded<br>
Content-Length: 35<br><br>username=3D********&amp;password=3D********<br><b=
r>the only difference is that the Host header is <a href=3D"http://stage.co=
2.dgen.net">stage.co2.dgen.net</a> rather than <a href=3D"http://stage.co2.=
dgen.net/" target=3D"_blank">http://stage.co2.dgen.net</a>.<br>
<br>Regards,<br><br>Thade<br><br><div class=3D"gmail_quote">2009/3/13 jj <s=
pan dir=3D"ltr">&lt;<a href=3D"mailto:jjshea...@gmail.com">jjsheahan@gmail.=
com</a>&gt;</span><br><blockquote class=3D"gmail_quote" style=3D"border-lef=
t: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1=
ex;">
<br>
I&#39;m developing a website project using PHP, and the http request code<b=
r>
I have for getting authorization from the AMEE database is:<br>
<br>
$header =3D POST /auth HTTP/1.0\nAccept: application/xml\nHost:<br>
<a href=3D"http://stage.co2.dgen.net" target=3D"_blank">http://stage.co2.dg=
en.net</a>\nContent-Type: application/x-www-form-<br>
urlencoded\nContent-Length: 36\n\nusername=3D/**username**/&amp;password=3D=
/<br>
**password**/;<br>
$s =3D socket_create(AF_INET, SOCK_STREAM, 0);<br>
$z =3D socket_connect($s, &quot;193.34.29.200&quot;, $port);<br>
socket_write($s, $header, strlen($header));<br>
<br>
I got this code from the php with sockets example in the developers<br>
area of the AMEE website.<br>
<br>
This code is creating the connection between my website and the AMEE<br>
website, but the http request above is causing a 400 bad request<br>
error.<br>
<br>
How do I change this code to get the authorisation token from the AMEE<br>
website?<br>
<br>
Thanks,<br>
J.J.<br>
<br>
</blockquote></div><br>

--0016e6de17b28637ff046505361b--


Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google