I have to make a get request to a url to download a xml file hourly. I am changing my code over to php.
in the past the code was :
Set oXMLHTTP = CreateObject("MSXML2.XMLHTTP.3.0")
oXMLHTTP.Open "GET", "http://api.sportsdatallc.org/golf-t1/leaderboard/pga/2012/tournaments/" & currentidString & "/leaderboard.xml?api_key="given key id", False
oXMLHTTP.Send
If oXMLHTTP.Status = 200 Then
Set oStream = CreateObject("ADODB.Stream")
oStream.Open
oStream.Type = 1
oStream.Write oXMLHTTP.responseBody
oStream.SaveToFile "file.xml", 2
oStream.Close
End If
how can I do this using php? I am confused because of all the extra lines for http.