Jump to content

Keep MSN script running


Baggins

Recommended Posts

Hi everyone!

 

I want to use a script that i found to make an msn status thing which will show your status and stuff.

 

The problem is connecting to the msn server every time I call the script is too slow.

 

I have attached the file I am using to connect, and I was wondering if you could help me make it so that it will open the connection, leave it open, and still let other scripts call functions from it.

 

Please help me, this is urgent.

 

Baggins

 

EDIT: also, I don't have SSH only cron jobs

 

[attachment deleted by admin]

Link to comment
Share on other sites

Sorry, I don't really understand.

 

Whenever status.php is called it connects to the server using msn.class.php and returns an image according to the status.  This method is too slow, and I want it to somehow maintain a connection to the server so it will not have to connect every time the script is called.

 

I want the class to sign in as an msn client and when the script is called it will check if the requested user is online.

 

EDIT: I'm gunna make this real simple, I must:

1. Open and keep open connection to msn server.

2. Let other scripts utilize connection through msn.class.php

Link to comment
Share on other sites

Look into setting timeout to 0 and making php sleep() for x seconds.  Also make it so there is no abort even if the user closes the page.  This could cause server problems if it can't be closed, so make sure you fopen() a file and check that the file contains a 0 not a 1 (you manually change it to 1 to turn off the script).  This script will close after about 400 executions, so you would test to see how long until this script stops working, and set a cron job to run that often.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.