PHP/CURL
Posted: Fri Nov 02, 2007 9:32 am
I'm receiving HTTP POST and I need to send a response back saying wether or not I got the post sucessfully or not. I also need to redirect to a confirmation page.
I was using CURL to develop this. But seems like nothing was being sent.
Every vendor keeps sending me information like this:
*****************************************************
leads[0] : lead_id = 6145194, partner_id = 592, campaign_code =
POST /vendor_script.php HTTP/1.0
Host: [URL]
Content-Length: 293
User-Agent: Mozilla/4.0 (compatible; MSIE 4.0;Mac_PowerPC)
Content-Type: application/x-www-form-urlencoded
firstname=Clifton&middlename=&lastname=Webb&suffix=&email=fred643%40
comcast.net&home=313-673-9403&work=313-322-3002&other=&program=CJAA&
address1=9178+Cameron+St+&city=DETROIT&state=MI&zip=48211&age=25&
expectedstart=immediately&education=Some+College&gradyear=1981&comments=&form=MonsterNetwork
HTTP/1.1 200 OK
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: PHP/5.2.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
Date: Fri, 02 Nov 2007 00:02:45 GMT
Connection: close
Then the confirmation page that I print out for the user is typically at the end of all this information.
How do send a reponse back? It seems this is done by printing out something and I print a confirmation page but they're looking for a server response. Can somebody help me with this?
I was using CURL to develop this. But seems like nothing was being sent.
Every vendor keeps sending me information like this:
*****************************************************
leads[0] : lead_id = 6145194, partner_id = 592, campaign_code =
POST /vendor_script.php HTTP/1.0
Host: [URL]
Content-Length: 293
User-Agent: Mozilla/4.0 (compatible; MSIE 4.0;Mac_PowerPC)
Content-Type: application/x-www-form-urlencoded
firstname=Clifton&middlename=&lastname=Webb&suffix=&email=fred643%40
comcast.net&home=313-673-9403&work=313-322-3002&other=&program=CJAA&
address1=9178+Cameron+St+&city=DETROIT&state=MI&zip=48211&age=25&
expectedstart=immediately&education=Some+College&gradyear=1981&comments=&form=MonsterNetwork
HTTP/1.1 200 OK
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: PHP/5.2.0
MicrosoftOfficeWebServer: 5.0_Pub
X-Powered-By: ASP.NET
Date: Fri, 02 Nov 2007 00:02:45 GMT
Connection: close
Then the confirmation page that I print out for the user is typically at the end of all this information.
How do send a reponse back? It seems this is done by printing out something and I print a confirmation page but they're looking for a server response. Can somebody help me with this?