| View previous topic :: View next topic |
| Author |
Message |
John_Maclain Voice
Joined: 07 Apr 2006 Posts: 23 Location: England
|
Posted: Fri Apr 07, 2006 2:31 pm Post subject: Help with refreshing a http page with eggdrop |
|
|
OK here we go with the explanation.
A friend has an eggdrop with a stats bot. The stats bot is one of the main toys in our chan.
I have a website with a status page, on that page is a php script with a variable online / offline status.
i have a cron job set up that checks into the script and sets the variable to offline every 29th and 59th minute of every hour.
What i want the bot to do is check into the script every 31st and 1st minute of the hour to set teh variable back to "online".
This gives me a fairly accurate online / offline status of the bot.
I have no knowledge of tcl or eggdrop, but know "basic" bash commands, and i do mean basic ( i can navigate edit and create files) lol.
Any help / advice MUCH appreciated. _________________ http://www.morphies.net |
|
| Back to top |
|
 |
John_Maclain Voice
Joined: 07 Apr 2006 Posts: 23 Location: England
|
Posted: Fri Apr 07, 2006 3:15 pm Post subject: |
|
|
not sure if this will help but it's a convo i had in an eggdrop help chan.... didnt really help me much....
| Quote: | [20:00] <John_Maclain> i just said above, the script uses two web address, one to swap the status to online, one to set to offline
[20:00] <paultwang> ok ..
[20:01] <John_Maclain> if i load up these http address in my browser, i get teh script to work
[20:01] <paultwang> so you just type the 'online' address in browser and go?
[20:01] <John_Maclain> now i need the bot to trigger the online
[20:01] <paultwang> yes or no?
[20:01] <John_Maclain> yes
[20:01] <paultwang> nothing else to type? no forms to submit?
[20:01] <John_Maclain> no
[20:01] <paultwang> that wasn't too hard..
[20:02] <John_Maclain> noep
[20:02] <paultwang> you don't need the "getting" part, nor string manipulation
[20:02] <paultwang> two less things to know
[20:02] <John_Maclain> ok
[20:02] <paultwang> when bot is connected, transmit:
[20:02] <paultwang> GET path/to/file HTTP/1.1
[20:03] <paultwang> HOST: domainname
[20:03] <paultwang>
[20:03] <paultwang> that's all for the requesting
[20:04] <John_Maclain> sorry for being a complete n000b, but how do i implement that into eggdrop?
[20:05] <paultwang> that's one part
[20:05] <John_Maclain> ok
[20:05] <paultwang> you need a trigger (bind time)
[20:05] <paultwang> you need a triggee (a procedure)
[20:05] <John_Maclain> ok
[20:06] <paultwang> the procedure needs to open a socket to connect to the web server
[20:06] <paultwang> and if done asynchronously, needs another procedure to wait for response
[20:07] <John_Maclain> ok... would there be a response?
[20:07] <paultwang> if done synchronously, eggdrop will freeze up during the proc call
[20:07] <paultwang> when connection attempt is approved, procedure needs to send the stuff i just said
[20:07] <paultwang> then drop the connection
[20:07] <paultwang> ?
[20:07] <paultwang> better not
[20:08] <paultwang> it dropped the connection after sending
[20:08] <paultwang> any response will be lost in the sea of electrons
[20:08] <John_Maclain> lol ok
[20:08] <John_Maclain> you say there needs to be a trigger...
[20:10] <paultwang> yes
[20:11] <John_Maclain> asin everytime i want the script to run, i would have to trigger it?
[20:11] <paultwang> no
[20:12] <paultwang> a time trigger
[20:12] <paultwang> triggers every specified time |
_________________ http://www.morphies.net |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|