Jump to content

Recommended Posts

Just started learning about sockets today for a project I am working on...would appreciate some guidance as I may not be really clear on how they work yet.  I know it is possible to send a web page to someone's browser through the socket as a response to their connection.  Let's say the page you serve them has a link with GET variable attached or a form with POST variables, and you want to use that information to calculate your next response to them.  How does one go about doing that?  I've tried just using $_GET['variable'], etc within the php script but no luck with that, however when the user first directs the browser to the socket, they are sending headers.  Am I supposed to use regular expressions, etc to parse the headers and extract the information from get and post or is there some easier or better way to do this?  I've seen lots of examples from google on how to send a response on the socket from telnet, but nothing about how to create some sort of browser interactive response.  Any body able to help out with this?

Link to comment
https://forums.phpfreaks.com/topic/56607-sockets-to-serve-dynamic-content/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.