Jump to content

Antrikssh

Members
  • Posts

    11
  • Joined

  • Last visited

Everything posted by Antrikssh

  1. Hello Everyone,My question is how to run my web server (Apache, mysql, php) over USB Dongle (means accessing internet by usb dongle).I want access net by using dongle(3G/2G) and run my webserver so that my friend will see my site through internet by using public ip address that I got after connecting to net. For one session it will work as static ip, in that session I will use that ip address for accessing my webserver content through other network.If there is any way to do this please tell me ...Thanks and Regards,Antrikssh....
  2. hi, Yes you are right i made a mistake in my example i.e (1)$object = array();for($i = 0; $i < 5; $i++) {$object = new MyClass();} (2) How I will delete my one post and how I will communicate with the moderator.plz help me
  3. Hello Everyone,I have to create object array for my userdefine class. In c++ when we create class and we want to create object array then we simply do by following statement.// My class in c++class MyClass {public:int iVal;}if we want to create object array you do like that in c++MyClass obj[5];In this we create 5 object of class MyClass.I want to do same thing in php.Thanks and Regards,Antrikssh...
  4. Hello Sir, Yes you are right, I have post wrong topic on wrong place. I have to post this post on php question related section not in web server section. I apologies for this. But sir method that you describe is array of object not the object array. We do the same thing that you done in yor post like $object = array();for($i = 0; $i < 5; $i++) {$object = new MyClass();} after this we will get the same thing that you got array of 5 object. which is not my requirment. Thanks and Regards,Antrikssh....
  5. Hello Everyone, I have to create object array for my userdefine class. In c++ when we create class and we want to create object array then we simply do by following statement. // My class in c++ class MyClass { public: int iVal;} if we want to create object array you do like that in c++ MyClass obj[5]; In this we create 5 object of class MyClass. I want to do same thing in php. Thanks and Regards,Antrikssh...
  6. Hello Everyone, Thanks to all for your precious time that you gave me. I solved my problem by using socket programming. Mr. Moderator thanks to gave me right direction otherwise I nevered got the required solution.
  7. Hello, I worked on pack, unpack function of php. I made a simple test by using pack and unpack function. I worte a simple code like <?php $SrcArry = array(10,20,30,40,50); $DestArry = array(); $Str = NULL; for ($i = 0;$i < 5;$i++) { $Str .= pack('I', $ScrArry[$i]); } $DestArry = unpack('I*',$Str); var_dump($SrcArry); var_dump($DestArry);?> I named this file MyTest.php. Now when I execute this file by using php MyTest.php I got the result like Result of var_dump($ScrArry) array(5) { [0]=> int(10) [1]=> int(20) [2]=> int(30) [3]=> int(40) [4]=> int(50) Result of var_dump($DestArry) array(5) { [1]=> int(10) [2]=> int(20) [3]=> int(30) [4]=> int(40) [5]=> int(50)} My question is this why index of array changed during pack unpack function like [0] => 10 in $ScrArry and[1] => 10 in $DestArry.When I assign source array in destionation array by using $SrcArry = $DestArry (without using pack/unpack) then my indexing of array is correct. Thanks and Regards,Antrikssh...
  8. Hello, I am sorry for my late reply, Mr. Moderator thanks for giving me such a pricious knowlege to us. Can you please help me to build my server script because I want to learn that , In php how I will build my server. You Kow that what I am requiring with my server. Please help me and teach me about the server site programming.I used socket programming but its very lengthy way. Is there is any other alternative for my requirment. In corn problem is minimium time of script execution(1 min). Once again I share my requirment in very simple manner.1) I want to create server script in which I will create database connection and then I will pass this object to other script so that it will use this object as per there requirment.2) I dont want to create seperate connection of database for each request. If my reuirment is logically possible then help me. Otherwise tell me where I am wrong so that I will never do this mistake again. Please help me to out of this... Thanks Antrikssh....
  9. As I was said in my first post that I am waorking with the site (for learning purpose) and I am new with this work. I have created my client pages. Now I want to build server script for that. Server script is running on command line continuously as per my knowledge(if I am wrong then please correct me). I want to define all the database operation in server script. Now If I run my server script then my database connection will make once at that time and that will use by each client script. I have used Socket connection but I dont want to do my task by that way. I want to do my task as I am thinking. Create one database connection in server and take the request from different user perform the operation in server and send the result to client.And server must running continuously.
  10. Yes I use Linux, but corn is used to execute the script on sepecific interval of time minimum(1 min) maximum that you allocate. If my script is execute in every 1 min. and I will get the the updated data after every 1 min then its not a good solution for that because there is lot of user who use my site on a single time or in difference of sec then how the get from server. I hope you understand my problem and requirement. Thanks...
  11. 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...
×
×
  • Create New...