Forum Moderators: coopster
I wish to set up an access class for robots. And, store the access_class in a cookie. BUT, my browser (masquerading as a robot) does not return the cookie to the server.
Why? Can you help me understand what is going wrong? :)
Platform: PHP4.x, Apache and Linux, browser = Mozilla.
My browser (masquerading as a robot) is set to accept all cookies, also: set to ask to accept. After the server establishes that the caller is a robot a cookie is successfully sent. (My browser shows me it)
But when the browser calls the same page again, the server side validation isset($_COOKIE[$this->cookie_name]) is negative, not true. Ie: there is no cookie returned. Why?
Here is a simplification of the logic:
function login_reader() {
if (isset($_COOKIE[$this->cookie_name])) {
. . strip out values stored in cookie_string
. . eg: access_class
. . when robot: this code is never visited
} else {
IF ( $this->test_if_robot() ) {
. . set access class, etc for robots
. . when robot: this code is visited every time
} else {
. . set access class, etc for visitors
}
. . setcookie
. . cookie lives until robot browser closes
} Well, I hope you can help.
Look forward to your replies, thanks
GrahamB