If you need fopen() on a URL to timeout, you can do like:
<?php
$timeout = 3;
$old = ini_set('default_socket_timeout', $timeout);
$file = fopen('http://example.com', 'r');
ini_set('default_socket_timeout', $old);
stream_set_timeout($file, $timeout);
stream_set_blocking($file, 0);
//the rest is standard
?>
<%
Function IsExi(url)
On Error Resume Next
IsExi= False
Set x = Server.CreateObject("Microsoft.xmlhttp")
x.Open "HEAD",url,false
x.send
IsExi= (x.status = 200)
End Function