Anyway, here's the problem:
The below link:
refer.ccbill.com/cgi-bin/clicks.cgi?CA=xxxx&PA=yyyy
sets a cookie on the users system.
if I type it in the address bar or do a PHP header redirect it works (verified with netscape cookie manager)
However it does NOT set the cookie if I call it using fopen
fopen("http://refer.ccbill.com/cgi-bin/clicks.cgi?CA=xxxx&PA=yyyyy", "r");
I need to be able to set the cookie using this code from within a php tagged segment of an html/php document...
Any ideas why it doesn't work using fopen and it works using the normal ways?
[edited by: jatar_k at 6:27 am (utc) on Dec. 6, 2002]
[edit reason] delinked [/edit]
is there a way around it using the fopen code? no idea, sorry.
mavherick
<?php
are cookie's enabled by browser?
IF NO --> break;
IF YES -->
FETCH mycookie
IF mycookie EXISTS break;
IF mycookie doesn't exist
set mycookie
header_refresh(ccbill_refercode&RETURNTO=index.php)
?>
<HTML> (your webpage) </HTML>