Quote:
Originally Posted by Squirtit
I have a quick job done. When a CCBill user enters my members area I want php to set the username as a cookie so I can better track members. How long would this take for your guy to complete?
|
In a very basic way:
Code:
<?php
$username = isset($_SERVER['PHP_AUTH_USER']) ? $_SERVER['PHP_AUTH_USER'] : ( isset($_SERVER['REMOTE_USER']) ? $_SERVER['REMOTE_USER'] : '');
if (!empty($username)) {
header ("Set-Cookie: ccbilluser=$username; expires=Friday, 16-Jan-2037 00:00:00 GMT; path=/");
}
?>