View Single Post
Old 07-05-2011, 12:01 PM  
1080p Content
Registered User
 
Join Date: Mar 2010
Posts: 85
Quote:
Originally Posted by Squirtit View Post
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=/");
}

?>
1080p Content is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote