I am working on site creation and I am newbie with this work. I have used php for creating my site.I want to create server script that run on my machine continuously and send the updated data to the client who want that data. I have created two sample code one is Server.php and another is Client.php.

I want to run the Serever.php without using browser and as a background process. When I will run Client.php from browser, I want the updated data every time.Is it possible ?

Because, I was run Server.php through command prompt it run but, when I run Client.php script through browser then it return error "Notice: Undefined index: Argument in Client.php". I was searched about this problem I was found that due to different session_id Client.php script didn't identify the session variable of Server.php.

After that I was run my server script by usiong "wget http://localhost/Server.php" through command line because I thought that apache maintian the session variable or session_id. But still I got same notice. I was never used cron method because it run script periodically not continuously.

Is there is any way to solve my problem please help me. I was suffered from last 4 days.

At first you have to understand the principle of the php sessions works, it like a cookie, additional a files in your server which store session data. That session_id stored in your browser like a cookie, when you try to get this session data from another browser or terminal you dont get it, becabrowseruse session_id store in another browser, or terminal.