I am trying to send an HTTP post to a server in order to dynamically grab news feed data. How do I do this using PHP?
Below is the ASP equivalent..but I don't know how to make it work in PHP... please help..
<%@ LANGUAGE="VBScript" %>
<%
Dim objXMLHTTP, xml
Set xml = Server.CreateObject("Microsoft.XMLHTTP")
xml.Open "POST", "http://newsfeedpage.cfm", False
xml.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
PostData = "username=" + Server.URLEncode("myusername") + "&password=" + Server.URLEncode("mypassword") + "&service=" + Server.URLEncode("servicename") + "&fontface=" + Server.URLEncode("Courier") + "&fontsize=" + Server.URLEncode("1") + "&type=" + Server.URLEncode("headlines")+ "&sid=" + Server.URLEncode("1")+ "&nextURL=" + Server.URLEncode("detailedarticlepage.asp")
xml.Send PostData
MyPacket = xml.responseText
Set xml = Nothing
Response.write MyPacket
%>
Thanks