/    Sign up×
Community /Pin to ProfileBookmark

what if it blocks ?

Hi guys,

I am performing a search two remote sites and I was wondering how could I specify in my script that, if one site is down, the script should continue rather than block ? Is there maybe a way to put a limit time for a particular search?

I know it sounds stupid but I would really take any guess you have !

thank you so much !

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@bokehOct 22.2006 — This is always going to be a problem because PHP is a single thread language. If you have to open multiple sites open them all at the same time with fsockopen in non blocking mode. This will save a lot of time. After they are all open go back to the first and try to read from it in non blocking mode. If there is nothing proceed to the next. etc.
Copy linkTweet thisAlerts:
@patimagesauthorOct 22.2006 — wahooo... that seems to be a great idea ! But I would not know how to do this. could you give me a quick an exemple: let's say I want to search http://www.yahoo.com/query="whatever" and http://www.google/query="whatever", how would you do this ?

By the way, I would like to take this chance to thank you very much for all your help Mr. Bokeh. Because of you I learned a real lot in the past few months. you are really the best ! thank you, sincerely.
Copy linkTweet thisAlerts:
@bokehOct 22.2006 — could you give me a quick an exemple[/QUOTE]Have a look at the comments section in the manual. http://www.php.net/fsockopen#33888
×

Success!

Help @patimages spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...