Dude Posted October 6, 2008 Posted October 6, 2008 Hello,i get the following error:"error allocating memory"on this Script. Not directly on starting, but after a while. And not always:$x=0DoInetGet("http://www.xxxx.xxx/index.php?id=8726&no_cache=1", "foo_bar.html", 1,0)$size = FileGetSize("foo_bar.html")if $size<=0 then ;---do nothingelse $file = FileOpen("foo_bar.html", 0) If $file = -1 Then Exit EndIf While 1 $html = FileRead($file) If @error = -1 Then ExitLoop $cHash=StringRegExp($html,"5&cHash=(.*)id",1) $vote=StringRegExp($html,"]=(.*)&tx_nxfotogalerie_pi1",1) $match1=StringRegExp($html,"xxxxxx",0) $match2=StringRegExp($html,"xxxxxxxxxxx....",0) $match3=StringRegExp($html,"xxxxxxx",0) ;------------ $match_test=StringRegExp($html,"typo3temp/pics/(.*).jpg",1) $match_test2=StringRegExp($html,"typo3temp/pics/(.*).jpg",0) Wend FileClose($file) ;if $match_test2=1 then ; $file2 = FileOpen("log.txt", 1) ; FileWriteLine($file2, $match_test[0]) ; FileClose($file2) ;EndIf if $match1=1 or $match2=1 or $match3=1 then $cHash_replace = StringTrimRight ($cHash[0], 2 ) InetGet("http://www.xxxxxxx.xxx/index.php?id=xxx&no_cache=1&tx_nxfotogalerie_pi1[xx]=" & $xxx[0] & "&tx_nxfotogalerie_pi1[points]=5&cHash=" & $cHash_replace, "temp.html", 1, 0) ;-----LOG-------- $file3 = FileOpen("e:\penny_log.txt", 1) FileWriteLine($file3, @HOUR & ":" & @MIN & " ||| http://www.xxxxxx.xxx/index.php?id=8726&am...fotogalerie_pi1[xx]=" & $vote[0] & "&tx_nxfotogalerie_pi1[points]=5&cHash=" & $cHash_replace) FileClose($file3) ;---------------- Runwait ("e:\0. Vote\1. Fritz_Box_reconnect\reconnect.bat", "e:\0. Vote\1. Fritz_Box_reconnect\", @SW_HIDE) sleep(10000) $x=$x+1 endIfEndIf Until $x >= 5000
000000 Posted January 8, 2010 Posted January 8, 2010 I got the same issue as you.The error conding was at "InetGet". It should be closed using InetClose($hDownload) .
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now