Slashdot Mirror


phpstack - A TCP/IP Stack and Web Server in PHP

Adam Dunkels writes "Following the trend of writing 'inappropriate' programs in the PHP scripting language, I have written a small TCP/IP stack and a web server entirely in PHP. It is extremely stripped down: the IP stack only implements the most basic functionality required for running the web server and the web server cannot handle pages larger than 1.5k. Nevertheless, the stack is able to support an unlimited number of simultaneous TCP connections and the web server has support for PHP scripting. A live demonstration server is up and running the phpstack software."

24 of 295 comments (clear)

  1. Unlimited connections, really? by zeux · · Score: 5, Funny

    The server only allows very small HTML pages and pictures, but it is able to support an unlimited amount of simultaneous connections.

    You shouldn't have said that here. We are about to brute test this 'unlimited amount of simultaneous connections' thing.

    1. Re:Unlimited connections, really? by ernstp · · Score: 5, Funny

      Must Click Link To Experimental Webserver, Must Click...

    2. Re:Unlimited connections, really? by requim · · Score: 5, Funny
      You shouldn't have said that here. We are about to brute test this 'unlimited amount of simultaneous connections' thing.

      I believe that was his point (Why not have slashdot do your load testing..)
    3. Re:Unlimited connections, really? by gl4ss · · Score: 4, Funny

      "Read more about the phpstack on its home page:

      http://www.sics.se/~adam/phpstack/

      You are visitor number 3241 and your IP address is"

      thats part of the page I got.

      --
      world was created 5 seconds before this post as it is.
  2. Alright. by whiteranger99x · · Score: 5, Funny

    Ok everyone, get it out of your systems already! :P

    "whoa 2 comments and it's already slashdotted"
    "whoa dude, shouldn't have let slashdot post your server!"
    "Imagine a beowulf cluster of these guys"

    And i'm sure you can figure out more Slashdotisms people *smirks*

    Seems pretty cool at any rate

    --
    Join the TWIT army now!
    1. Re:Alright. by Leffe · · Score: 2, Funny

      "Seems as if the demo server is running phpstack."

  3. ouch... by zoloto · · Score: 5, Funny

    unlimited number of simultaneous TCP connections

    To the tune of Queen:
    Another one bytes the dust!

    1. Re:ouch... by Sir_Real · · Score: 5, Funny

      Well... You really were asking for it...

      With apologies to the late F.M.

      Php is a scripting language
      not a layer three network stack
      Ain't no way your server won't break
      Unless you're sitting in a SONET node rack

      Are you crazy? Are you certified
      Your server is a molten heap
      Through the floor the slag still drips
      to the sound of the beep

      Chorus:
      Another one bytes the dust
      Another one bytes the dust
      And another one gone, and another one gone
      Another one bytes the dust
      Hey, I'm gonna slashdot you
      Another one bytes the dust

      How long till my router cacks
      after a weekend slashdot bitch smack
      I invested everything that I had
      even wrote a custom ip stack

      Are you crazy? Are you certified
      Your server is a molten heap
      Through the floor the slag still drips
      to the sound of the beep

      chorus

      There are plenty of ways you can hurt a host
      and bring it to its knees
      you can heat em
      you can drop em
      you can install bad ram
      and even try using Windows ME

      But you're batshit, yes out of your tree
      If you think your isp won't freak
      Through the floor your server melts
      To the sound of the beep

      chorus

  4. Re:That is a VERY limited system.... by Fearless+Freep · · Score: 2, Funny

    Another story about something being done in PHP that ends up not being quite as impressive as the headline led to believe?

  5. A man with way too much free time by HBI · · Score: 2, Funny

    Between that C-64 based multitasking, multiplatform operating system with tcp/ip and a web server in it, and this...

    Dude, you need beer and chicks.

    --
    HBI's Law: Frequency of calling others Nazis is directly correlated with the likelihood of the accuser being Communist.
  6. Re:Ouch by jx100 · · Score: 5, Funny

    "You are visitor number 1339"

    dammit, if I was only 2 users earlier...

  7. cool! by Anonymous Coward · · Score: 2, Funny

    now we only have to port PHP to wristwatches and commodore 64s to get them on the net.

  8. Re:Hardly new.. by Bender_ · · Score: 4, Funny

    Yes, it is new. The difference is that it is not only a web server, but also an entire TCP/IP stack!

  9. Different window? by kendallemm · · Score: 5, Funny
    Just let it load in a different window while you read the rest of the headlines.

    This is slashdot. I think you meant "different tab" ;)

    KB
  10. Why? by Billy+the+Mountain · · Score: 3, Funny

    I think I might know why. Unless I'm missing the boat here, this would lead to making a more efficient web server. If the IP stack, the web server and the dynamic HTML processing is all integrated into one program, it seems to me that you'd have one very efficient html-processing screamer.

    BTM

    --
    That was the turning point of my life--I went from negative zero to positive zero.
  11. I understand... by rsilvergun · · Score: 4, Funny

    this is what's taking Duke Nukem Forever so long. It's actually done, but it's all written entirely in PHP and they're waiting for the hardware to catch up.

    --
    Hi! I make Firefox Plug-ins. Check 'em out @ https://addons.mozilla.org/en-US/firefox/addon/youtube-mp3-podcaster/
  12. Dear PHP TCP/IP Stack by Letter · · Score: 0, Funny
    Dear PHP TCP/IP Stack,

    Please contact me when you have moved from the "proof of concept" phase into the "production" phase, because I am interested in making a large purchase of your product to run on our systems. I am a systems consultant for a Fortune 500 e-commerce company.

    Sincerely,
    Letter

  13. Not forgetting ... has Linux been ported to it yet by mikael · · Score: 2, Funny

    At this rate of development, it won't be long before somebody has the Linux kernel implemented in PHP.

    --
    Vintage computer adverts: http://www.vintageadbrowser.com/computers-and-software-ads
  14. Interesting by Pan+T.+Hose · · Score: 4, Funny

    Can this web server run PHP applications? If so, can it run the TCP/IP stack and a web server in-- Oh, God, my head!

    --
    Sincerely,
    Pan Tarhei Hosé, PhD.
    "Homo sum et cogito ergo odi profanum vulgus et libido."
  15. Re:I For One... by binaryspiral · · Score: 2, Funny

    This was the cry of many editorials back in the 50's and 60's when the U.S. went to the moon. But where would we be without Velcro or pens that can write upside down?!

  16. Re:Nanoweb anyone ? by Tokerat · · Score: 4, Funny


    Yea, but does it support PHP? ;-)

    --
    CAn'T CompreHend SARcaSm?
  17. Re:PSHTTPD - PostScript webserver by InfiniteZero · · Score: 5, Funny

    What would be REALLY impressive is a webserver written in HTML.

  18. Re:PHP and MySQL by kwenda · · Score: 2, Funny
    #!/usr/bin/php

    mysql_connect("host", "user", "pass");
    mysql_select_db("database");

    mysql_qu ery("UPDATE users SET owned=1 WHERE userId=79406");
  19. Re:That is a VERY limited system.... by fbjon · · Score: 2, Funny

    What? You have my homework solutions?

    Post Immediately!

    --
    True confidence comes not from realising you are as good as your peers, but that your peers are as bad as you are.