GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   small setcookie php question [pls help] (https://gfy.com/showthread.php?t=633765)

DutchTeenCash 07-16-2006 07:24 AM

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

woj 07-16-2006 07:28 AM

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

??

DutchTeenCash 07-16-2006 07:55 AM

Quote:

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 :/

DutchTeenCash 07-16-2006 08:08 AM

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

GFX Wiz 07-16-2006 08:19 AM

$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.

knightdown 07-16-2006 08:22 AM

Quick get a new coder

DutchTeenCash 07-16-2006 09:15 AM

Quote:

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!

teksonline 07-16-2006 09:22 AM

ugh, don't you have to read the cookie :)

Kimo 07-16-2006 09:57 AM

goodluck getting it to work :)

darksoul 07-16-2006 10:22 AM

erm,
your coder has been missing for months now :)

woj 07-16-2006 05:02 PM

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


All times are GMT -7. The time now is 08:57 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123