Leopardfist Posted October 3, 2013 Share Posted October 3, 2013 I have a simple txt file on my server. The exact address is http://craftarr.com/Blacklist I have been trying to troubleshoot why XProTect does not read it, so I wrote a little program to see if I could get it to read, and I cant. I don't know why. I don't know if I need specific server settings or what, but it definitely isnt reading. I can open it in a browser, not sure if that is the same or not. Global $Name = "bill_michelle@live.com" Global $pwn = 0 Global $Temp = 0 If INetGet("http://craftarr.com/blacklist.txt", $Temp, 1) = 1 Then Local $Str = fileread($Temp) filedelete($Temp) If StringInStr($Str, $Name) Then msgbox(0,"a","Yes") Else msgbox(0,"a","no") EndIf Else msgbox(0, "Bad", "Did not read at all") EndIf Maybe someone can point out what I am doing wrong or what settings I need to add so it works? Link to comment Share on other sites More sharing options...
abberration Posted October 3, 2013 Share Posted October 3, 2013 Have you considered InetRead? $webURL = BinaryToString(InetRead("http://craftarr.com/Blacklist")) MsgBox(0, "", $webURL) Easy MP3 | Software Installer | Password Manager Link to comment Share on other sites More sharing options...
Developers Jos Posted October 3, 2013 Developers Share Posted October 3, 2013 You have a couple of issues in your script: 1. The var $temp should contain a filename 2. The url is wrong in your script since your webserver is case sensitive. 3. The If is wrong as InetGet returns the bytes received. Global $Name = "bill_michelle@live.com" Global $pwn = 0 Global $Temp = "blacklist.txt" If INetGet("http://craftarr.com/Blacklist.txt", $Temp, 1) Then Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Leopardfist Posted October 3, 2013 Author Share Posted October 3, 2013 Thanks Jos, that fixed it . I was going according to the original script on XProTect.au3 If InetGet($D_Link & "Blacklist.txt", $rtemp, 1) = 1 Then $itemp = FileRead($rtemp) FileDelete($rtemp) If StringInStr($itemp, $X_read003) Or StringInStr($itemp, $ND_Mail) Then mError("This program has been abused and will now close ", 6, 1) EndIf Once I changed it to If InetGet($D_Link & "Blacklist.txt", $rtemp, 1) Then It worked fine . THANK YOU SO MUCH! Link to comment Share on other sites More sharing options...
Leopardfist Posted October 3, 2013 Author Share Posted October 3, 2013 Have you considered InetRead? $webURL = BinaryToString(InetRead("http://craftarr.com/Blacklist")) MsgBox(0, "", $webURL) Thanks man, that actually lookos MUCH easier to do. Link to comment Share on other sites More sharing options...
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