Jump to content

Recommended Posts

Posted

Hello all,

Im trying to get the information from https website, but it does not return any thing, here is the code:

Global $oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$agent ='Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.112 Safari/537.36'
$url = "https://www.sportinglife.com/racing/results"
$oHTTP.Open("GET", $url, False)
$oHTTP.setRequestHeader ("User-Agent", $agent)
$oHTTP.Option(4) = 13056
$oHTTP.Send()
$src = ($oHTTP.ResponseText)
ConsoleWrite($url & @CRLF)
MsgBox(0, '$src', $src)

when i tried with other website, it is working, but this code does not works with this website. Pls help me

thank you.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...