Page 1 of 1

XVIDEOS Embed Question

Posted: Wed Nov 27, 2019 2:09 pm
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

Re: XVIDEOS Embed Question

Posted: Wed Nov 27, 2019 4:55 pm
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.

Re: XVIDEOS Embed Question

Posted: Fri Nov 29, 2019 6:24 pm
by 247mg
Not working.

Send pm please check.

Re: XVIDEOS Embed Question

Posted: Fri Nov 29, 2019 6:30 pm
by 247mg
Its works.. THANKS

Re: XVIDEOS Embed Question

Posted: Fri Nov 29, 2019 6:58 pm
by admin
NP