Jump to content

Question about _InetGetSource


 Share

Recommended Posts

Hello there,

I am makin an application which read the remote file every after 5 sec to take the updated command, now i am facing a strange problem

when i start my app its work perfect for the 1st time, but after that when i update the remote file my app still getting the old source, not updated until i restart my app.

In InetGet function i found one parameter

reload[optional] 0 = (default) Get the file from local cache if available
                  1 = Forces a reload from the remote site

i tried with the InetGet reload parameter with 1 flag , butt its also giving the same result as _InetGetSource.

i also check my file from browser after every update; but its not working with Inet, is there any way to solve this problem ?

;Try with _InetGetSource
_InetGetSource("http://abc.com/myfile/cmd.inf")

;Try with InetGet
INetGet("http://abc.com/myfile/cmd.inf",@ScriptDir&"\temp.x",1)

both codes are work perfect for the first time but unable to get the updated source.

Thanks in Advance

73 108 111 118 101 65 117 116 111 105 116

Link to comment
Share on other sites

Try to change this line in INet.au3 (_INetGetSource):

Local $ai_IOU = DllCall($h_DLL, 'int', 'InternetOpenUrl', 'int', $ai_IO[0], 'str', $s_URL, 'str', $s_Header, 'int', StringLen($s_Header), 'int', 0x80000000, 'int', 0)

to:

Local $ai_IOU = DllCall($h_DLL, 'int', 'InternetOpenUrl', 'int', $ai_IO[0], 'str', $s_URL, 'str', $s_Header, 'int', StringLen($s_Header), 'int', 0x80000800, 'int', 0)

Alternatively, you can do:

Local $oXML = ObjCreate("Microsoft.XMLHTTP")

$oXML.Open("GET", "http://m.www.yahoo.com", 0)
$oXML.Send

ConsoleWrite($oXML.responseText & @CRLF)

..for example. If I'm not wrong, GET verb forces reload and POST looks for in the catch first.

Link to comment
Share on other sites

Try to change this line in INet.au3 (_INetGetSource):

Local $ai_IOU = DllCall($h_DLL, 'int', 'InternetOpenUrl', 'int', $ai_IO[0], 'str', $s_URL, 'str', $s_Header, 'int', StringLen($s_Header), 'int', 0x80000000, 'int', 0)

to:

Local $ai_IOU = DllCall($h_DLL, 'int', 'InternetOpenUrl', 'int', $ai_IO[0], 'str', $s_URL, 'str', $s_Header, 'int', StringLen($s_Header), 'int', 0x80000800, 'int', 0)

0x80000800 flag not work at all.

Local $oXML = ObjCreate("Microsoft.XMLHTTP")

$oXML.Open("GET", "http://m.www.yahoo.com", 0)
$oXML.Send

ConsoleWrite($oXML.responseText & @CRLF)

end with error

$oXML.SEND
$oXML.SEND^ ERROR
Edited by Digisoul

73 108 111 118 101 65 117 116 111 105 116

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...