GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Tech Question about redirect visitors by country? (https://gfy.com/showthread.php?t=1308246)

Brian mike 01-21-2019 04:15 AM

Question about redirect visitors by country?
 
I have few countries i try to redirect to another offers so i find this website

"Are you looking for code snippet to redirect visitors by country?"
https://www.ip2location.com/free/visitor-redirection

Please note i have not really any knowledge on coding so bare with me :)
I need to know if using site like this can help us "webmaster with limited knowledge" or if it risky and that will create a backdoor for who ever use those code.

Thanks Grumpy :pimp


this is the code generate by this tools to redirect countries

PHP Code:

<?php
require 'IP2Location.php';
 
$loc = new IP2Location('databases/IP-COUNTRY.BIN'IP2Location::FILE_IO);
$record $loc->lookup($_SERVER['REMOTE_ADDR'], IP2Location::ALL);
 
if(
$record == 'CN') {
    
header('HTTP/1.1 301 Moved Permanently');
    
header('Location: https://xxxxxxxxxxxxxx.com/?p=3054&media_type=adult&pi=allsitesunwantedcountry');
    exit;
}
 
if(
$record == 'IN') {
    
header('HTTP/1.1 301 Moved Permanently');
    
header('Location: https://xxxxxxxxxxxxxxxx.com/?p=3054&media_type=adult&pi=allsitesunwantedcountry');
    exit;
}
 
if(
$record == 'RU') {
    
header('HTTP/1.1 301 Moved Permanently');
    
header('Location: https://xxxxxxxxxxxxxxxxx.com/?p=3054&media_type=adult&pi=allsitesunwantedcountry');
    exit;
}
 
if(
$record == 'UA') {
    
header('HTTP/1.1 301 Moved Permanently');
    
header('Location: https://xxxxxxxxxxxxxxxxxx.com/?p=3054&media_type=adult&pi=allsitesunwantedcountry');
    exit;
}
 
?>



I would have to install this IP2Location PHP Module first.

PHP Code:

<?php
require 'IP2Location.php';
 
/*
   Cache whole database into system memory and share among other scripts & websites
   WARNING: Please make sure your system have sufficient RAM to enable this feature
*/
// $db = new \IP2Location\Database('./database/IP-COUNTRY-SAMPLE.BIN', \IP2Location\Database::SHARED_MEMORY);
/*
   Cache the database into memory to accelerate lookup speed
   WARNING: Please make sure your system have sufficient RAM to enable this feature
*/
// $db = new \IP2Location\Database('./database/IP-COUNTRY-SAMPLE.BIN', \IP2Location\Database::MEMORY_CACHE);
 
 
/*
    Default file I/O lookup
*/
$db = new \IP2Location\Database('./database/IP-COUNTRY-SAMPLE.BIN', \IP2Location\Database::FILE_IO);
 
$records $db->lookup('8.8.8.8', \IP2Location\Database::ALL);
 
echo 
'<pre>';
echo 
'IP Number             : ' $records['ipNumber'] . "\n";
echo 
'IP Version            : ' $records['ipVersion'] . "\n";
echo 
'IP Address            : ' $records['ipAddress'] . "\n";
echo 
'Country Code          : ' $records['countryCode'] . "\n";
echo 
'Country Name          : ' $records['countryName'] . "\n";
echo 
'Region Name           : ' $records['regionName'] . "\n";
echo 
'City Name             : ' $records['cityName'] . "\n";
echo 
'Latitude              : ' $records['latitude'] . "\n";
echo 
'Longitude             : ' $records['longitude'] . "\n";
echo 
'Area Code             : ' $records['areaCode'] . "\n";
echo 
'IDD Code              : ' $records['iddCode'] . "\n";
echo 
'Weather Station Code  : ' $records['weatherStationCode'] . "\n";
echo 
'Weather Station Name  : ' $records['weatherStationName'] . "\n";
echo 
'MCC                   : ' $records['mcc'] . "\n";
echo 
'MNC                   : ' $records['mnc'] . "\n";
echo 
'Mobile Carrier        : ' $records['mobileCarrierName'] . "\n";
echo 
'Usage Type            : ' $records['usageType'] . "\n";
echo 
'Elevation             : ' $records['elevation'] . "\n";
echo 
'Net Speed             : ' $records['netSpeed'] . "\n";
echo 
'Time Zone             : ' $records['timeZone'] . "\n";
echo 
'ZIP Code              : ' $records['zipCode'] . "\n";
echo 
'Domain Name           : ' $records['domainName'] . "\n";
echo 
'ISP Name              : ' $records['isp'] . "\n";
echo 
'</pre>';
?>


AdultKing 01-21-2019 04:29 AM

Google doesn't like it unless you're redirecting to country specific pages on the same domain. eg: https://apple.com/au or https://adobe.com/jp etc

https://www.searchenginejournal.com/...cation/205996/

YMMV

Brian mike 01-21-2019 05:31 AM

will read that article, Thx

Anybody else Get Ridiculous inflated amount of Traffic from India ?
There is some website i have that are not really active the last little couple months with any update and now India Traffic almost taking over :1orglaugh.

AdultKing 01-21-2019 05:42 AM

Quote:

Originally Posted by Brian mike (Post 22400833)
will read that article, Thx

Anybody else Get Ridiculous inflated amount of Traffic from India ?
There is some website i have that are not really active the last little couple months with any update and now India Traffic almost taking over :1orglaugh.

How are you seeing that traffic? Google Analytics?

Have you confirmed it's real traffic? ie: visitors entering your site and moving between pages?

If not, could it be fusker type traffic? There's a few very big Indian fusker sites.

If it is real traffic then you need to think about how to convert that traffic from your site rather than redirect it.

Brian mike 01-21-2019 05:58 AM

Quote:

Originally Posted by AdultKing (Post 22400837)
How are you seeing that traffic? Google Analytics?


https://i.postimg.cc/ZnmgM0HW/as.jpg

Quote:

Originally Posted by AdultKing (Post 22400837)
Have you confirmed it's real traffic? ie: visitors entering your site and moving between pages?

If not, could it be fusker type traffic? There's a few very big Indian fusker sites.

:disgust
infected files ? the website below have 5 page we have created HOME - GALLERY - DONATION - BOOK ME - LINK
https://i.postimg.cc/bJyVx4wn/asxxx.jpg

Quote:

Originally Posted by AdultKing (Post 22400837)
If it is real traffic then you need to think about how to convert that traffic from your site rather than redirect it.

I have no buyers for that kind of traffic :1orglaugh

AdultKing 01-21-2019 06:06 AM

Quote:

Originally Posted by Brian mike (Post 22400843)
https://i.postimg.cc/ZnmgM0HW/as.jpg


:disgust
infected files ? the website below have 5 page we have created HOME - GALLERY - DONATION - BOOK ME - LINK
https://i.postimg.cc/bJyVx4wn/asxxx.jpg


I have no buyers for that kind of traffic :1orglaugh

Do you have bollywood mp3's on your site, because that looks like what the page traffic is going to.

Brian mike 01-21-2019 06:09 AM

Quote:

Originally Posted by AdultKing (Post 22400845)
Do you have bollywood mp3's on your site, because that looks like what the page traffic is going to.

nope, 5 page we have created HOME - GALLERY - DONATION - BOOK ME - LINK

So i guess that website is infected ? :disgust I did scan with wordfence and all Cleared .

AdultKing 01-21-2019 06:11 AM

Quote:

Originally Posted by Brian mike (Post 22400847)
nope, 5 page we have created HOME - GALLERY - DONATION - BOOK ME - LINK

So i guess that website is infected ? :disgust

Look in the top left hand corner of the second image you posted.

There are two directories

/temp/
/bollywood mp3/

There could be more but you've only provided a small amount of information, but it's enough to see that you've likely been hacked and people are downloading what they think are bollywood mp3 files. That would explain the sudden influx of Indian traffic.

Brian mike 01-21-2019 06:12 AM

Quote:

Originally Posted by AdultKing (Post 22400849)
Look in the top left hand corner of the second image you posted.

There are two directories

/temp/
/bollywood mp3/

There could be more but you've only provided a small amount of information, but it's enough to see that you've likely been hacked and people are downloading what they think are bollywood mp3 files.

Thank you passing this to my server admin to taking care of this :thumbsup

AdultKing 01-21-2019 06:13 AM

Quote:

Originally Posted by Brian mike (Post 22400850)
Thank you passing this to my server admin to taking care of this :thumbsup

No worries, let me know if you need any further help.


All times are GMT -7. The time now is 08:03 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123