XVIDEOS Embed Question

Post Reply
247mg
Posts: 7
Joined: Tue Jun 12, 2018 1:58 pm

XVIDEOS Embed Question

Post by 247mg »

Hello

XVideos.com has been banned in India but XVideos2.com is working. The embed code with xvideos.com

<iframe src="https://www.xvideos.com/embedframe/37452663" frameborder=0 width=510 height=400 scrolling=no allowfullscreen=allowfullscreen></iframe>

is working world wide but not in India, The following code works in India

<iframe src="https://www.xvideos2.com/embedframe/37452663" frameborder=0 width=510 height=400 scrolling=no allowfullscreen=allowfullscreen></iframe>

How can we do a setup in smartcj that if user is from India, system will show iframe with xvideos2.com and if outside India, system will show xvideos.com

Please help.

Thanks
admin
Site Admin
Posts: 37242
Joined: Wed Sep 10, 2008 11:43 am

Re: XVIDEOS Embed Question

Post by admin »

Hi,

in templates

<?
$embed_code = <<<HEREDOC
<!--EMDEB_CODE-->
HEREDOC;

if ($_SERVER['GEOIP_COUNTRY_CODE'] == 'IN') {
$embed_code = str_replace('xvideos.com', 'xvideos2.com', $embed_code);
}

echo $embed_code;
?>


I hope the code is pretty self-explainable.
Don't forget to run script update
247mg
Posts: 7
Joined: Tue Jun 12, 2018 1:58 pm

Re: XVIDEOS Embed Question

Post by 247mg »

Not working.

Send pm please check.
247mg
Posts: 7
Joined: Tue Jun 12, 2018 1:58 pm

Re: XVIDEOS Embed Question

Post by 247mg »

Its works.. THANKS
admin
Site Admin
Posts: 37242
Joined: Wed Sep 10, 2008 11:43 am

Re: XVIDEOS Embed Question

Post by admin »

NP
Don't forget to run script update
Post Reply