MyBB Community Forums
Costum IP - Hide yourself - Printable Version

+- MyBB Community Forums (https://community.mybb.com)
+-- Forum: Community Archive (https://community.mybb.com/forum-106.html)
+--- Forum: Archived Forums (https://community.mybb.com/forum-143.html)
+---- Forum: Archived Development and Support (https://community.mybb.com/forum-155.html)
+----- Forum: MyBB 1.6 (https://community.mybb.com/forum-138.html)
+------ Forum: 1.6 Security Management and Support (https://community.mybb.com/forum-153.html)
+------ Thread: Costum IP - Hide yourself (/thread-176276.html)



Costum IP - Hide yourself - Nitrome - 2015-08-26

Hello there Smile


I was wondering, can I totally fake my IP address by modifying the get_ip(); function in /inc/functions.php ? (the related file: https://github.com/mybb/mybb/blob/master/inc/functions.php#L3000 )

I tried to add this in the bottom of the get_ip(); function (just before the "return $ip;" )

if($mybb->user['uid'] == '3456')
{
	$ip = '64.233.184.94';
}

where 3456 is my user identifiant, and 64.233.184.94 a fake IP address, I want to replace the real one only for me...


But it doesn't work... (of course I have added the line "global $db;" at the top of the function get_ip(); )

Can you help me please ? Big Grin

Mybb 1.6.15


RE: Costum IP - Hide yourself - Sazze - 2015-08-27

I guess somewhat like this could work.

if($mybb->user['uid'] == "3456")
{
$ip = "64.233.184.94";
}
else {
the real stuff, like $ip or w.e
}



RE: Costum IP - Hide yourself - Nitrome - 2015-08-27

Thanks!

But... it doesn't work Confused

I also tried to write only this line
$ip = '64.233.184.94';
it works fine, but for all the member ...

i conclude that the function doesn't understand this line
if($mybb->user['uid'] == "3456")

Anyone know how to do?

Thanks for help Wink




EDIT: Fixed !!

I simply write that at the end of the get_ip() function

if(!empty($mybb->cookies['mybbuser']))
{
	$logon = explode("_", $mybb->cookies['mybbuser'], 2);
	if($logon[0] == '3456')
	{
		$ip = '64.233.184.94';
	}
}
		


Thanks for the help Big Grin