Author Topic: PHP Sessions carried through TCPObjects  (Read 658 times)

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!

Nevermind, solution was to echo session_id(). And get the client to send that back.

Add the (); then the {} then like
Poo

Nevermind, solution was to echo session_id(). And get the client to send that back.

You could always store the conversations through sql or in a file or something..

You could always store the conversations through sql or in a file or something..

They are. The sessions just help identify each client so the conversations don't get mixed up.