Automatically input website user details
Posted: Sat Jan 28, 2006 6:21 pm
Hi
I'm trying to download a particular web page using the code below but can't access it as a username and password are required. The code does download an HTML page but it's the login screen. Is there any way to pass a username and password to the website using code?
I'm trying to download a particular web page using the code below but can't access it as a username and password are required. The code does download an HTML page but it's the login screen. Is there any way to pass a username and password to the website using code?
Code: Select all
Procedure.s OpenURL(Url.s, OpenType.b)
; OpenURL procedure by ricardo 2003
isLoop.b=1
INET_RELOAD.l=$80000000
hInet.l=0: hURL.l=0: Bytes.l=0
Buffer.s=Space(2048)
hInet = InternetOpen_("PB@INET", OpenType, #Null, #Null, 0)
hURL = InternetOpenUrl_(hInet, Url, #Null, 0, INET_RELOAD, 0)
Repeat
Delay(1)
InternetReadFile_(hURL, @Buffer, Len(Buffer), @Bytes)
If Bytes = 0
isLoop=0
Else
res.s = res + Left(Buffer, Bytes)
EndIf
Until isLoop=0
InternetCloseHandle_(hURL)
InternetCloseHandle_(hInet)
ProcedureReturn res
EndProcedure
URL$ = "http://www.screenselect.co.uk/account/selection.html"
CreateFile(0,"F:\Downloads\ScreenSelect.html")
WriteString(OpenURL(URL$, 1))
CloseFile(0)
End