Jump to content

Sockets to serve dynamic content


calabiyau

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.