dagnasty Posted July 6, 2006 Share Posted July 6, 2006 So I'm working on a bittorrent search engine. Here's a sample of what i've gotten done so far http://comptechcomputers.com/tsearch/tsearch.phpWhat I want to do is get rid of iframes altogether. However, if a site were to not respond to an http search query request it would hold up the whole page until cURL spit out an error or the site finally responded to the request. My question:How would I go about finding out if a torrent site (a page in particular)is responding to http requests. Is there a way to send a short request for maybe http headers (?) instead of the whole page, and set a timeout limit of maybe 3 seconds so it doesn't hold up the page's loading terribly slow if in fact the site isn't responding?A simple ping would not suffice, of course, because it doesn't not tell if an http server is up on it. Quote Link to comment https://forums.phpfreaks.com/topic/13887-need-advice-not-code/ Share on other sites More sharing options...
effigy Posted July 6, 2006 Share Posted July 6, 2006 I've never used CURL myself, but it looks like you can do this based on the manual page:[code]curl_setopt($cUrl, CURLOPT_TIMEOUT, 'timeout_in_seconds');[/code] Quote Link to comment https://forums.phpfreaks.com/topic/13887-need-advice-not-code/#findComment-54109 Share on other sites More sharing options...
dagnasty Posted July 6, 2006 Author Share Posted July 6, 2006 Thanks! I looked through it but I didn't know if there was a way to check to see if it timed out then I realized there's a way to get outputted errors. Hopefully this works! Quote Link to comment https://forums.phpfreaks.com/topic/13887-need-advice-not-code/#findComment-54121 Share on other sites More sharing options...
dagnasty Posted July 7, 2006 Author Share Posted July 7, 2006 when the page times out it doesnt output an error. However, when a host cannot be found ex. www.dasfklfsdklfdsljsfd.com it does. Kinda sucks :(Ideas anyone? Quote Link to comment https://forums.phpfreaks.com/topic/13887-need-advice-not-code/#findComment-54225 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.