Jump to content
Israelks

InetRead Problem

Recommended Posts

Israelks

Hello, i'm trying to use InetRead to get some information from a website, in my computer this script works fine, but in a specific computer it don't work

Local $a= InetRead("https://meuarquivoteste.weebly.com/uploads/1/1/6/8/116881805/test.txt",16)
Local $b = BinaryToString($a)
MsgBox(0,"",$b)

I also tried with winhttp.winhttprequest.5.1, works fine for me, but don't work on the another computer

$oHTTP = ObjCreate("winhttp.winhttprequest.5.1")
$oHTTP.Open("GET", "https://meuarquivoteste.weebly.com/uploads/1/1/6/8/116881805/test.txt", False)
$oHTTP.Send()
$oReceived = $oHTTP.ResponseText
$oStatusCode = $oHTTP.Status
MsgBox(0,"",$oReceived)

 

 

problema2.png

Share this post


Link to post
Share on other sites
Israelks

This is what i want to see (using inetread)

 Screenshot_1.png

and this is what appears on the another computer

Screenshot_2.png

Share this post


Link to post
Share on other sites
Jos

You state that InetRead() is having a problem .. and then go on in your initial post showing 2 pieces of code and an error, which is from the second scriptlet ...right?

So for the first script: Have you checked what the returned error information is like described in the helpfile?

Quote

Return Value

Success: a binary string and @extended set to the number of bytes downloaded.
Failure: "" (empty string) and sets the @error flag to non-zero.

For the Second script: Add an ComErrorHandler to your script and check the information of the error. This is the only way to get more inside as to why it fails on that particular pc.

Jos


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Israelks
Quote

You state that InetRead() is having a problem .. and then go on in your initial post showing 2 pieces of code and an error, which is from the second scriptlet ...right?

Yes.

I got "1" error from inetread 

and this with the second script:

SbG5sqAJTxS0H1O7awBlmg.png

Share this post


Link to post
Share on other sites
orbs

@Israelks, welcome to the AutoIt forum.

the obvious cause would be that the "other computer" has connectivity issues with the target URL. the first COM error (which is the only important one, since the successive erroneous operations depend on the first one) hints of a DNS issue. is that "other computer" inside a corporate network? or protected by some additional means, such as a firewall?

Share this post


Link to post
Share on other sites
Israelks
3 hours ago, orbs said:

 

is that "other computer" inside a corporate network?

No,

 

3 hours ago, orbs said:

or protected by some additional means, such as a firewall?

i've tried disable the firewall but i got the same error, maybe the problem is DNS? how to know if the problem is DNS?

 

Edited by Israelks

Share this post


Link to post
Share on other sites
orbs

open a browser and type the full URL in the address bar (and press "Enter"). see if you get the text inside the file, or any error message.

additional reading (first result when google "resolve dns issues")

 

Share this post


Link to post
Share on other sites
mikell

The issue seems IE related, this occurs frequently with Weebly
The address in the code - as well as this one - doesn't work in my (old) IE browser
You might try to update IE to the latest version

Share this post


Link to post
Share on other sites

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

×