| Blockland Forums > Modification Help |
| PHP Sessions carried through TCPObjects |
| (1/1) |
| Fluff-is-back:
Hope the title is apropriate; I have created a bot using AIML (Artificial Intelligence Markup Language) and it runs using PHP via ProgramE. I have made a client for my server that sends message strings to the PHP Server that communicates with the bot, however, the answers are often irrelivent and the bot cannot remamber anything because, I realised that the PHP Server relies on a SessionID to keep track of the conversation, how can I make sure this is transmitted through with the message. At the moment the TCPObjects sends a get request smilar to this: /server.php?botName=BotName&input=Hello! however this URL requires a SESSIONID=... to be sent to function correctly, does the server send the ID to the client? Sorry for the long paragraph, hope you can help! |
| Fluff-is-back:
Nevermind, solution was to echo session_id(). And get the client to send that back. |
| Rusty:
Add the (); then the {} then like Poo |
| Wizzeh:
--- Quote from: Fluff-is-back on August 24, 2011, 07:05:56 PM ---Nevermind, solution was to echo session_id(). And get the client to send that back. --- End quote --- You could always store the conversations through sql or in a file or something.. |
| Fluff-is-back:
--- Quote from: Wizzeh on August 24, 2011, 09:37:03 PM ---You could always store the conversations through sql or in a file or something.. --- End quote --- They are. The sessions just help identify each client so the conversations don't get mixed up. |
| Navigation |
| Message Index |