Search the Community
Showing results for tags 'Server Script'.
-
What is this cod and what is it dosing? a.txt
-
Hello Everyone,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.Server.php<?phpsession_start();$_SESSION['Argument'] = 10;while(1) {print "Updated data in Server Script ".$_SESSION['Argument'];$_SESSION['Argument'] += 20;sleep(5);}?>Client.php<?phpsession_start();print "Updated data in Client Script ".$_SESSION['Argument'] ;?> I have ran this Server.php Script from command prompt and I want that updated data I will get on Client.php script whenever I run client script. But the problem is when I ran Server.php script through command line it ran as per instruction but when I run Client Script through command line/ Browser it is in hold(Connecting...) process. I thought that Server.php never lose any resources for client script even I gave sleep() for 5 sec. My question is that I will get my updated data from server when server run continously on my machine. I dont want to use Socket method.Thanks and Regard,Antrikssh...