Some sites need:

http.SetRequestHeader ("Host", "yoursite.com")
http.SetRequestHeader ("Connection", "keep-alive")
http.SetRequestHeader ("User-Agent", "Mozilla/5.0 (Macintosh; U; PPC  
Mac OS X; en) AppleWebKit/125.5.7 (KHTML, like Gecko) Safari/125.12")
http.SetRequestHeader ("Accept", "*/*")
http.SetRequestHeader ("Accept-Encoding", "gzip, deflate;q=1.0,  
identity;q=0.5, *;q=0")
http.SetRequestHeader ("Accept-Language", "en, ja;q=0.50")

Johan Simons


On 13/04/2007, at 1:09 AM, Carlo Rubini wrote:

> I too follow the same procedure with this variation:
> if the socket connects I close the socket and return true, while if  
> I get a 103 error I return false.
> And the socket is an object dragged in the window.
> But I was thinking whether it would not be better pinging a site.
> Does anybody have  the necessary code to ping a site?
>
> Thanks,
>
>> Sub ConnectionAvailable()As String
>>
>>     dim http as new HTTPSocket
>>       http.yield = true
>>       dim temp as String = http.get("http://www.yoursite.com";, 5)
>>        if len(temp) > 0 then
>>              return temp
>>        else
>>             // No connection
>>      end if
>
>
> -- 
> Carlo
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to