Created
October 13, 2021 13:54
-
-
Save LucasGorgal/36d0cf7148ae68bffd295f732fc9ca1e to your computer and use it in GitHub Desktop.
VPO_202110
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$ep = $_GET['ep']; | |
if($ep == '1') { | |
$video_id = "ZacEikh8kVQ"; | |
} elseif($ep == '2') { | |
$video_id = "3wJo0_zqi3s"; | |
} elseif($ep == '3') { | |
$video_id = "gu-Jz6b7DzQ"; | |
} elseif($ep == '4') { | |
$video_id = "OVGDPIcqYbA"; | |
} | |
$ipod = stripos($_SERVER['HTTP_USER_AGENT'], "iPod"); | |
$iphone = stripos($_SERVER['HTTP_USER_AGENT'], "iPhone"); | |
$android = stripos($_SERVER['HTTP_USER_AGENT'], "Android"); | |
if($ipod || $iphone) { | |
$url = "vnd.youtube://www.youtube.com/watch?v=$video_id&v=$video_id"; | |
} else if($android) { | |
$url = "intent://www.youtube.com/watch?v=$video_id#Intent;package=com.google.android.youtube;scheme=https;end"; | |
} else { | |
$url = "https://www.youtube.com/watch?v=$video_id"; | |
} | |
$mobile_fallback = "https://www.youtube.com/watch?v=$video_id"; | |
?> | |
<html> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<script> | |
!function(f,b,e,v,n,t,s) | |
{if(f.fbq)return;n=f.fbq=function(){n.callMethod? | |
n.callMethod.apply(n,arguments):n.queue.push(arguments)}; | |
if(!f._fbq)f._fbq=n;n.push=n;n.loaded=!0;n.version='2.0'; | |
n.queue=[];t=b.createElement(e);t.async=!0; | |
t.src=v;s=b.getElementsByTagName(e)[0]; | |
s.parentNode.insertBefore(t,s)}(window, document,'script', | |
'https://connect.facebook.net/en_US/fbevents.js'); | |
fbq('init', '123553691512182'); //Id do pixel | |
fbq('track', 'PageView'); //Conversão | |
fbq('trackCustom', 'CPL'); //Conversão | |
</script> | |
<noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=123553691512182&ev=PageView&noscript=1"/></noscript> <!-- Id do pixel --> | |
<!-- MUDAR TUDO COM CONVERSÃO DO GOOGLE ADS --> | |
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-941768981"></script> | |
<script> | |
window.dataLayer = window.dataLayer || []; | |
function gtag(){dataLayer.push(arguments);} | |
gtag('js', new Date()); | |
gtag('config', 'AW-941768981'); | |
gtag('event', 'conversion', {'send_to': 'AW-941768981/n0AyCMiNy_sCEJWCicED'}); | |
</script> | |
</head> | |
<body> | |
<script type="text/javascript"> | |
window.setTimeout(function() { | |
window.location.href = "<?php echo $url; ?>"; | |
}, 2000); | |
window.setTimeout(function() { | |
window.location.href = "<?php echo $mobile_fallback; ?>"; | |
}, 2500); | |
</script> | |
<h1>Estamos te redirecionando em alguns segundos...</h1> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment