Quote:
Originally Posted by Marco van Herwaarden
$_SERVER['REMOTE_ADDR'] should be available even with register globals turned off. Otherwise some things in vBulletin would also not work.
But if it will work as an auto_prepend_file like you are trying i don't know.
|
Thanks for response
shown me please simply way to inculude() my.php at the very PHP script this Vbulletin and get $_SERVER['REMOTE_ADDR'].
I have a test script geschieben. It can get $_SERVER['REMOTE_ADDR'].
in browser:
http://mysite.com/test.php
test script:
Code:
<?php
$ip = $_SERVER['REMOTE_ADDR'];
echo "$ip";
?>
but if 'require_once('my.php')' filled in showthread.php throw errors.
Code:
PHP Notice: Undefined index: REMOTE_ADDR in my.php on line XX
Why??
i have read
http://www.vbulletin.com/docs/html/t..._externalfiles
if i want only to run a php script at top of every php script this vbulletin.
It is nothing with output Display.
below code is correct for this thing? Howto test it?
Create a Plug-in for global_start
Code:
ob_start();
require_once(DIR.'my.php');
ob_end_clean();