rascal
asked on
How to programmatically send a form in PHP (ASP equivalent shown below)
We are able to programmatically send a form to a target website (in this case, a contact information form sent to Constant Contact) using the following ASP code:
' allocate the XMLHTTP object that will be used to send the form
set xmlServerHttp = server.createObject("MSXML 2.ServerXM LHTTP.4.0" )
xmlServerHttp.Open "POST", sSourceURL, False
xmlServerHttp.setRequestHe ader "Content-Type", "application/x-www-form-ur lencoded"
'response.write("sParams=" & sParams & "<br>")
' send the form
xmlServerHttp.send sParams
' set the return value
SendFormToIContactMovement = trim(xmlServerHttp.respons etext)
Set xmlServerHttp = Nothing
But a client has a need for the same functionality on a PHP site. Is there a way to replicate this using PHP code?
thanks experts!
' allocate the XMLHTTP object that will be used to send the form
set xmlServerHttp = server.createObject("MSXML
xmlServerHttp.Open "POST", sSourceURL, False
xmlServerHttp.setRequestHe
'response.write("sParams="
' send the form
xmlServerHttp.send sParams
' set the return value
SendFormToIContactMovement
Set xmlServerHttp = Nothing
But a client has a need for the same functionality on a PHP site. Is there a way to replicate this using PHP code?
thanks experts!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thanks all - shanikawm's answer was the most complete and included examples, but everyone was very helpful - and the responses were almost immediate!
thanks again to all!
thanks again to all!
Maybe I should just hit Google in the future rather than actually writing a solution.
;)