file_get_contents() timeout

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
NFreak
Forum Newbie
Posts: 1
Joined: Sun Sep 17, 2006 9:59 pm

file_get_contents() timeout

Post by NFreak »

I am running an IRC bot on my website, and everytime someone posts a message in the chatroom, my IRC but does a file_get_contents(); and runs a script on my server.

Basically, this is a tricky way for me to run scripts on my server which doesn't allow shell use.

Occasionally, my bot will do a file_get_contents() but it won't connect, and it tries to connect for about a minute before it quits and processes the next message.

So is there a way to edit maybe my php.ini file to make it give up on connecting after three or four seconds, that way it doesn't get 50 messages in it's queue.

Thanks,
NFreak.
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Post Reply