Results 1 to 4 of 4

Thread: Need help creating a php socket server

  1. #1
    Join Date
    Feb 2006
    Location
    With mooncow on the moon
    Posts
    292
    Mentioned
    1 Post(s)
    Quoted
    0 Post(s)

    Post Need help creating a php socket server

    Hello,

    Please have a little patience with me while im explaining this -

    I was using a method of sending data to a php script and the data was written to a file and saved on the server. The data is being sent via a SCAR client. It bassicly did this in scar -

    Code:
        AddPostVariable(HTTP1, 'VarName'       ,  'var'  );
    
        SendCords:= PostHTTPPageex(HTTP1, 'website');
    So scar send the variables and the php script writes them to a .txt file on the web server

    This works fine but the speed is immensly slow, ive been reading up and it seems that my best option would be to create a php socket server for a greater speed?

    Now this is not my area of expertise but could anyone give me a helping hand, or show me the way that i should be approaching this?

    If you need any more details (I've been a little blunt i know) please ask!

    Any help is appreicated,
    ~ Solemn Wishes

  2. #2
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    You should not make a server with PHP... It makes no sense.

    What you want is a C or Java (sigh) server, which accepts incoming connections. That program will use a database, MySQL or PostGreSQL to store and retrieve it's data.

    Making it in PHP simply won't work. PHP isn't made for that... It is made for generating HTML and such, or performing small tasks once a website is loaded.
    If you want me to explain some more on server applications, sockets and PHP, feel free to ask.
    Last edited by Wizzup?; 04-09-2009 at 09:12 PM.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

  3. #3
    Join Date
    Oct 2007
    Location
    brooklyn, new york
    Posts
    258
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    Quote Originally Posted by Wizzup? View Post
    You should not make a server with PHP... It makes no sense.

    What you want is a C or Java (sigh) server, which accepts incoming connections. That program will use a database, MySQL or PostGreSQL to store and retrieve it's data.

    Making it in PHP simply won't work. PHP isn't made for that... It is made for generating HTML and such, or performing small tasks once a website is loaded.
    If you want me to explain some more on server applications, sockets and PHP, feel free to ask.
    I dont believe Java should be used here. c, c# or c++.

  4. #4
    Join Date
    Feb 2006
    Location
    Amsterdam
    Posts
    13,692
    Mentioned
    146 Post(s)
    Quoted
    130 Post(s)

    Default

    Quote Originally Posted by caustic View Post
    I dont believe Java should be used here. c, c# or c++.
    Well, in theory it is even possible with PHP. But I think that if Solemn doesn't know much C, sockets and threads can and WILL be a pain.



    The best way to contact me is by email, which you can find on my website: http://wizzup.org
    I also get email notifications of private messages, though.

    Simba (on Twitter | Group on Villavu | Website | Stable/Unstable releases
    Documentation | Source | Simba Bug Tracker on Github and Villavu )


    My (Blog | Website)

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •