SFML community forums
Help => Network => Topic started by: mimipim on December 23, 2010, 10:46:57 pm
-
PHP code:
<?php
require_once("config.php");
if(login($name, $pw)) {
echo "User: $name\nPassword: $pw";
} else echo 'You are not login! Please do it right now if you still want to live! :@';
?>
In cpp code:
std::cout<<Response.GetBody()<<"\n\n";
Everything is cool and work but.... I don't recive $name and, $pw values and i think the reason is that i read them from cookies.
Is there any solutions or advices for me please?
-
If you need cookie, you'll need to implement them. The RFC is http://www.ietf.org/rfc/rfc2109.txt Read ยง5 for examples.
Good luck!
-
Hiura, thanks for this link(information) but im not very good with English and that is a lot of english text for me.
I will be happy if you explane me with less words and write less code for examples.
Thanks.
Edit: All I need is to read and set cookies from my program.
-
well, I'm sorry but this is a HUGE thing! And I never used it before so I won't be able to help you. Sorry.
-
What does the received body look like?
I don't think it's related to cookies, if the variables are properly initialized in your PHP script they should be outputed correctly.
Is there a difference if you use regular variables, with hard-coded values?
-
Hiura, no problem. :)
Laurent, I test it now and if I overwrite these variables in PHP they return that value that im put in them. But when read from cookies return NULL in variables.
PS: In browser works just in program don't read them.
-
Can always bust out good ol' Wireshark (or similar). With FireFox, you can also use the Tamper Data plugin also to see the messages going to/from the browser.