Tell me, please, who knows why the function does not work with the specified site? _INetGetSource ("https://residence.biz.ua/")
It is necessary to work with the protocol https. What is the problem?
I was playing around with _INetGetSource(), and just seeing how it returned the bytes. It doesn't seem to return what I would expect, though. For example, I loaded up http://asdf.com/aboutasdf.html, and viewed the page source. Copy/ pasted that into a Notepad++ document, and I get a length of 2,481 characters > 2,481 bytes. When I do:
#include-once #include <Inet.au3> Global $sSource, $sSite = "http://asdf.com/aboutasdf.html" Global $iBytes $sSource = _INetGetSource($sSite) ;Get the page source for the account If Not @error Then ;As long as nothing goes wrong $iBytes += @extended ;Get number of bytes returned MsgBox(0, '', $iBytes & @CRLF & $sSource) ;Number of bytes, and the source ClipPut($sSource) Exit EndIf I get a return of 2,391 bytes (missing 90 bytes) from the @extended when I run _INetGetSource(). If I put the page source into my clipboard and paste that into the Notepad++ document, I still get 2,479 (it removed the top blank line that I get when selecting all from the page source in my browser). So the source that I copy from my browser, and that AutoIt puts in my clipboard is ~2,480 bytes. So, why is the @extended returning 2,391? Maybe I'm just missing something.
On just http://asdf.com/ it returns 1,892, which I get when copy/pasting as well, from the script and from the browser.
I'm trying to download a file from our server at work which requires a login.
InetGet is not working so I was looking round for another method.
I came across winhttp.au3 but it seems like this is not shipped with the Autoit ZIP I have. (v3.3.14)
Anyone have any ideas of where to get it, because I can't find it.
I also searched the forum, thinking it was trancexx who made it. (maybe I'm wrong here....)
Or is it obsolete and is there another / better way?
Good Morning All AutoIT Gurus,
#include <Inet.au3> $OpenHTML01 = _INetGetSource("https://get.adobe.com/flashplayer/") MsgBox (0, "", $OpenHTML01) A typical page response would include...
... within the <div id="autoSelectedVersion"> tag.
UPDATE: I believe it's this file that determines what OS, language, x32, x64, browser, etc that you are using and then reports it back...
It is the second time I am running to this problem again. First time I used simple form fill function from winhttp.au3. And I added a sleep between logins to make it work but this solution sucks.
So I am wondering again, is there an other solution to perform a log in on website other than simple form fill?
I just want to check credentials so I need to perform log in and then check for the username in the results.
Here is an example with simple form fill
#include "WinHttp.au3" Global $sRead, $hOpen, $hConnect Global $sUsername, $sPassword, $sName Global $sUrl = "https://www.facebook.com/" Global $sUserAgent = "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; Trident/6.0)" $hOpen = _WinHttpOpen($sUserAgent) $hConnect = _WinHttpConnect($hOpen, $sUrl) $sRead = _WinHttpSimpleFormFill($hConnect, _ Default, _ "login_form", _ "name:email", $sUsername, _ "name:pass", $sPassword) If @error Then MsgBox(0, "Error", "Error: " & @error) ElseIf StringInStr($sRead, $sName) = True Then MsgBox(0, "", $sName & "'s credentials are correct.") Else MsgBox(0, "", "Wrong credentials, please try again.") EndIf _WinHttpCloseHandle($hConnect) _WinHttpCloseHandle($hOpen)