small setcookie php question [pls help]

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DutchTeenCash
    I like Dutch Girls
    • Feb 2003
    • 21684

    #1

    small setcookie php question [pls help]

    k coder is gone and I have to get this to work today and my skills are like zero

    heres what I want:

    - landing page sets ccbill affiliate id
    - surfer goes to other page on same domain
    - surfer clicks straight www.bananabrandy.com url
    - aff id is set and aff gets credited

    heres what I got:

    http://www.dutchteencash.com/test/index.php?id=420671

    <?
    $value = $id;

    setcookie("ccbill_referer", $value, time()+60*60*24*30);
    ?>

    AND

    http://www.dutchteencash.com/test/link.php

    <?
    echo $_COOKIE['ccbill_referer'];
    ?>

    ... ok now when I click the join form and check the aff isnt set :/

    Pls help thanks!!!

    Bob

    ICQ 16 91 547 - SKYPE dutchteencash
    bob AT dutchteencash DOT com
    ... did you see our newest Sweet Natural Girl Priscilla (18)?
  • woj
    <&(©¿©)&>
    • Jul 2002
    • 47882

    #2
    maybe change:
    $value = $id;
    to
    $value=$_GET['id'];

    ??
    Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
    Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
    Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

    Comment

    • DutchTeenCash
      I like Dutch Girls
      • Feb 2003
      • 21684

      #3
      Originally posted by woj
      maybe change:
      $value = $id;
      to
      $value=$_GET['id'];

      ??
      nope then the linkpage doesnt display the cookie anymore and its not set

      no clue why its not workin :/

      ICQ 16 91 547 - SKYPE dutchteencash
      bob AT dutchteencash DOT com
      ... did you see our newest Sweet Natural Girl Priscilla (18)?

      Comment

      • DutchTeenCash
        I like Dutch Girls
        • Feb 2003
        • 21684

        #4
        ok it does display sorry but the cookie for the aff isnt set

        ICQ 16 91 547 - SKYPE dutchteencash
        bob AT dutchteencash DOT com
        ... did you see our newest Sweet Natural Girl Priscilla (18)?

        Comment

        • GFX Wiz
          Confirmed User
          • Jul 2004
          • 916

          #5
          $value = $_GET['id'] ;
          if ( !isset( $value ) ) {
          $value = $_COOKIE['CCBILL_REFERRER'];
          if ( !isset( $value ) ) {
          setcookie( 'CCBILL_REFERRER', $value, time() + 60 * 60 * 24 * 30, '/', 'domain.com', 0 );
          }
          } else {
          setcookie( 'CCBILL_REFERRER', $value, time() + 60 * 60 * 24 * 30, '/', 'domain.com', 0 );
          }

          This will check for the existence of a referrer from the clicked link then double-check to see if there is already a referrer for this cookie name. If none of that exists it will set a new cookie.

          Are you trying to pass the cookie from one domain to another? If you are you can't do that with plain old cookies...at least that's my understanding of cookies. But you can still accomplish that task using cookies and sessions and some creative thinking.
          ICQ: 148.167.599

          Comment

          • knightdown
            Confirmed User
            • Jul 2006
            • 162

            #6
            Quick get a new coder

            Comment

            • DutchTeenCash
              I like Dutch Girls
              • Feb 2003
              • 21684

              #7
              Originally posted by GFX Wiz
              $value = $_GET['id'] ;
              if ( !isset( $value ) ) {
              $value = $_COOKIE['CCBILL_REFERRER'];
              if ( !isset( $value ) ) {
              setcookie( 'CCBILL_REFERRER', $value, time() + 60 * 60 * 24 * 30, '/', 'domain.com', 0 );
              }
              } else {
              setcookie( 'CCBILL_REFERRER', $value, time() + 60 * 60 * 24 * 30, '/', 'domain.com', 0 );
              }

              This will check for the existence of a referrer from the clicked link then double-check to see if there is already a referrer for this cookie name. If none of that exists it will set a new cookie.

              Are you trying to pass the cookie from one domain to another? If you are you can't do that with plain old cookies...at least that's my understanding of cookies. But you can still accomplish that task using cookies and sessions and some creative thinking.
              nope doesnt work sorry

              I cant get it to work somehow, lemme hit you up

              thanks!

              ICQ 16 91 547 - SKYPE dutchteencash
              bob AT dutchteencash DOT com
              ... did you see our newest Sweet Natural Girl Priscilla (18)?

              Comment

              • teksonline
                So Fucking Banned
                • Jan 2005
                • 2904

                #8
                ugh, don't you have to read the cookie

                Comment

                • Kimo
                  ...
                  • Jan 2006
                  • 11542

                  #9
                  goodluck getting it to work
                  ...

                  Comment

                  • darksoul
                    Confirmed User
                    • Apr 2002
                    • 4997

                    #10
                    erm,
                    your coder has been missing for months now
                    1337 5y54|)m1n: 157717888
                    BM-2cUBw4B2fgiYAfjkE7JvWaJMiUXD96n9tN
                    Cambooth

                    Comment

                    • woj
                      <&(©¿©)&>
                      • Jul 2002
                      • 47882

                      #11
                      if you are still having issues, and want to toss a few bucks for someone to look into it, you can hit me up icq: 33375924
                      Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
                      Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
                      Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager

                      Comment

                      Working...