CrewXp Posted April 13, 2006 Share Posted April 13, 2006 I always have a list of http proxies. Example: (Just 1/40 of my list)165.228.128.10:3128165.228.128.11:80165.228.130.10:3128165.228.131.10:3128165.228.131.12:80165.228.132.10:3128I want to write a program that goes through the list and pings each proxy, sees which one is fastest. Then sets my proxy to it.But I'm stuck on the first part. Is there any way to ping a http proxy? THANKS!!! Link to comment Share on other sites More sharing options...
Uten Posted April 13, 2006 Share Posted April 13, 2006 I always have a list of http proxies. Example: (Just 1/40 of my list) I want to write a program that goes through the list and pings each proxy, sees which one is fastest. Then sets my proxy to it. But I'm stuck on the first part. Is there any way to ping a http proxy? THANKS!!! From the help file: Ping ( address or hostname [, timeout] ) If the proxy alowes ping it will answer. Or you could use tracert Please keep your sig. small! Use the help file. Search the forum. Then ask unresolved questions :) Script plugin demo, Simple Trace udf, TrayMenuEx udf, IOChatter demo, freebasic multithreaded dll sample, PostMessage, Aspell, Code profiling Link to comment Share on other sites More sharing options...
Valuater Posted April 13, 2006 Share Posted April 13, 2006 this worked with web addresses #include <file.au3> #include <Array.au3> $file = "listt.txt" Dim $aRecords If Not _FileReadToArray($file,$aRecords) Then MsgBox(4096,"Error", " Error reading log to Array error:" & @error) Exit EndIf Dim $list[$aRecords[0]] $list[0] = $aRecords[0] For $x = 1 to $aRecords[0] $var = Ping($aRecords[$x],250) If $var Then $list[$x] = $var & "," & $aRecords[$x] Else ; check for bad address Msgbox(0,"Status","An error occured with number: " & @error, 1) EndIf Next _ArraySort($list,1,1) _ArrayDisplay($list, "Fastest Speeds") *** did not work with your list 8) Link to comment Share on other sites More sharing options...
kclteam Posted April 13, 2006 Share Posted April 13, 2006 (edited) Best way would be to ping a known web-site (let's say http://www.autoitscript.com/forum/ with each proxy individually and get the time taken to fetch the page.I dunno how you would achieve this in AutoIt; you can use winhttp COM Object, may be. Edited April 13, 2006 by kclteam I believe we should all pay our tax with a smile. I tried - but they wanted cash! 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