The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
count sessions from nonvb pages
hi there,
we recently upgraded to vb3 and moved our forum to a different server. For cosmetic reasons we want the users on our main site to be counted in our forum and as sideefect keep their sessions if they switch form the forum to the mainsite and vice versa. to achieve that we thought about using this little neat trick: on every page on our main site we put a transparaent image that is generated in the forum: Code:
<img src="http://www.forum.com/sessionimage.php?" width="1" height="1"> Code:
// ####################### SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // #################### DEFINE IMPORTANT CONSTANTS ####################### define('THIS_SCRIPT', 'index'); define('VB_AREA', 'Forum'); define('NOPMPOPUP', 1); require_once('./global.php'); header('Content-type: image/png'); $Img = @ImageCreate (1, 1); $Gray = imagecolorallocate($Img,32,32,32); imagecolortransparent($Img,$Gray); imagepng($Img); imagedestroy($Img); cookies are set right, both sites are subdomain, cookiepath . .comain.com. i also checked the settings in admincp for allowing access from diffrent domains. but i doubt that these has anything to do ith the problem. thx |
#2
|
|||
|
|||
Is there a reason why you are (trying to) include it via an image rather than using the standard include() or require() methods?
|
#3
|
||||
|
||||
an image can be appended to a page to show how many users are online and at the same time count how many on that non vb page, although a php include would do the job just as well but an image can be made to look nicer in some instances
|
#4
|
||||
|
||||
It's not actually updated until it runs the shutdown queries. Add this to your PHP file,
PHP Code:
|
#5
|
|||
|
|||
the reason for not including the vb files is
Quote:
thx for the hint SirAdrian... sounds logic.. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|