I’m pretty sure internet connect merely monitors the connection, and doesn’t care what you’re sending or recieving… as long as it’s an active request to the internet. You shouldn’t need to do anything but request a web page to get the connection to stay open. Note that your isp may be caching dns requests, so you may need to send unique http requests to make them think you’re loading different pages… so you could query a search engine and use a random query to make it look like you’re on a web searching frenzy. I do this manually all the time when I’m visiting an unfortunate family member who has a dial-up connection, to keep the connection open. And, as NovaScotian suggests, the only time’s I get booted are when the phone line connection sucks or the isp’s server malfunctions. If you simply request a trivial web page in the background every few minutes, that should make the connection think you’re doing something really important, and keep it from timing out.
My first suggestion would be to use curl and a shell script. The request is sent as if you’re using a browser, but it doesn’t require that any browser be open. The following script will search for a new random string at yahoo.com for whatever interval you set in the ‘requestInterval’ property. Since it’s applescript, and not your usual download client, you’ll never know it’s running. Just make sure you remember to turn it off, or add some code to beep or dialog to periodically remind you that it’s on.
property requestInterval : 5 --> Number of minutes between queries
property requestURL : "http://search.yahoo.com/search?p="
on idle
set tmpQuery to random number from 10000 to 99999
set flag_A to "-A 'Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/175 (KHTML, like Gecko) Safari/1.3' "
(* Using curl *)
set tmpScript to ("curl " & flag_A & requestURL & tmpQuery) as string
do shell script tmpScript
return (requestInterval * 60)
end idle
Depending on your system and what types of requests your isp considers legitimate enough to keep the connection active, you could alternately use ping to simply send a ping request to a remote server. Ping essentially justs sends a message to the requestURL and asks it if it’s alive or not. You could use any domain or ip address that you know is valid (and allows pinging). The script may hang for a while if the address is invalid, so try to pick something you know is solid. Ping may not meet the uniqueness criteria of the isp, though.
property requestInterval : 5 --> Number of minutes between queries
property requestURL : "[url=http://www.google.com]www.google.com[/url]"
on idle
set tmpScript to ("ping -c 1 " & requestURL) as string
do shell script tmpScript
return (requestInterval * 60)
end idle
Both of the scripts above should be saved as “application”, and you should check the “stay open” button when saving. I’m on cable and don’t have any way to test these, so let me know if either works as intended.
You could also use the recommendation posted by NovaScotian above, which will open a web page in whatever the default browser is. As I noted though, you may need to somehow randomize your requests, as repeated calls to the same url (like www.google.com or checking your mail) may match existing dns requests on your isp’s cache and not be considered unique requests.
One final recommendation I have is to get a cable modem, and never worry about timing out.
Good luck…
j