Thread: cookies

Page 2 of 2 First 12
  • Jump to page:
    #16
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    53
    Rep Power
    15
    The Cookie name is help.
    The Cookie value attachted is username, which is equal to kunal in this cookie.
  2. #17
  3. Ole` Timer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    N.W. Iowa
    Posts
    472
    Rep Power
    15
    I'd have to see the code that set the cookie.

    Thunder Rain Internet Publishing

    Custom Programming & Database development
    Providing Personal/Business
    Internet Solutions that work!
  4. #18
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    53
    Rep Power
    15
    <code>

    use CGI qw (:standard);
    $q = new CGI;
    require "common.sub";
    $ip = $q->remote_host();

    require "config.cgi";
    &gettheaffiliate;

    print $q->header(-type=>'application/x-javascript');

    if ($getcookie) {
    print<<EOF;
    document.write("Referred by: $getcookie")
    EOF
    }
    else {
    print<<EOF;
    document.write("<font></font>")
    EOF
    }

    exit;

    sub gettheaffiliate {

    $getcookie = $q->cookie($cookiename);
    if ($getcookie) {}
    else {
    &Create_DB_Connection;
    $SQL="SELECT * FROM hits WHERE Ip='$ip'";
    &Do_SQL;
    while ($pointer = $sth->fetchrow_hashref){
    $getcookie = $pointer->{'Id'};
    }
    $sth->finish;
    $dbh->disconnect;
    }
    </code>

    There you go.
  6. #19
  7. Ole` Timer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    N.W. Iowa
    Posts
    472
    Rep Power
    15
    I've never seen this type of header being passed?? but where are you getting the "$getcookie" => if($getcookie)...how is the script grabbing this?? I don't see any way that the cookie is being set which is normally done thru the header(-cookie=>'name', -value=>'some_value');

    And the variable "$cookiename",..where is this comming from?? How is this assigned. There appears to be more to this script then shown. If you would like to send me a copy of the entire script, be happy to check it out. alot easier then doing here.

    Mickalo

    Thunder Rain Internet Publishing

    Custom Programming & Database development
    Providing Personal/Business
    Internet Solutions that work!
  8. #20
  9. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2000
    Posts
    53
    Rep Power
    15
    hehe... yea there is a lot more.. but the thing is its spread over 7other docs...
  10. #21
  11. Ole` Timer
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2000
    Location
    N.W. Iowa
    Posts
    472
    Rep Power
    15
    Hmmm,...interesting. The script has been written to use the CGI module,..why not make full use of it, instead of throwing into javascript! !

    Sorry could be more help,

    Mickalo

    Thunder Rain Internet Publishing

    Custom Programming & Database development
    Providing Personal/Business
    Internet Solutions that work!
Page 2 of 2 First 12
  • Jump to page:

IMN logo majestic logo threadwatch logo seochat tools logo