[ PHP Help? ] - After 40 seconds do SOMETHING!
2014-01-22, 03:05 PM,
#1
Hello guys well I need a locker script... So I'll have a landing page (1 HTML DOCUMENT) and I need a PHP script that can do the following:

After the visitor is on the page for 30-40 seconds (I need this adjustable), pause the YOUTUBE video and show the CONTENT locker from AWM.

Do you think this is possible?
Reply
2014-01-22, 03:10 PM,
#2
I have not tried with video but it can be done normally to a website,when user stays for sometime reading something and lock it after a certain duration.
Reply
2014-01-22, 03:53 PM,
#3
Not redirect to something but rather than showing the CONTENT LOCK and stopping the YOUTUBE video!
Reply
2014-01-22, 04:08 PM,
#4
It's kinda dumb because in these 30 seconds they're able to click on that video and leave your website though allowing them to watch it in full. Anyway the best would be if the variable could be stored in a session value so user can't cheat. I don't know how the networks adblock script would react to this, could be a nice combo anyway I'll help you write the code if you want, just pm me :)
Reply
2014-01-22, 09:51 PM,
#5
I don't think this can be done with youtube and it I'm sure you can't do this with PHP

So JavaScript and custom video player is the way to go, google for jquery video players or something that you can control.
Reply
2014-01-22, 09:57 PM, (This post was last modified: 2014-01-22, 10:56 PM by The_Mentor.)
#6
You could use sleep and make the length of it the variable so you can change it.
Reply
2014-01-23, 01:50 AM,
#7
(2014-01-22, 04:08 PM)RichBitch Wrote: It's kinda dumb because in these 30 seconds they're able to click on that video and leave your website though allowing them to watch it in full. Anyway the best would be if the variable could be stored in a session value so user can't cheat. I don't know how the networks adblock script would react to this, could be a nice combo anyway I'll help you write the code if you want, just pm me :)

There are certain parameters which somebody shared here on forum where you can hide YT controls, hide suggested videos at the end, use custom white theme, play YT videos in HD etc. So if he does that his potential leads won't be able to click away. Only question is if he can pause the video from YT with php or javascript?
Latest Thanks - View all

Braco22(2014-01-23 04:07 AM) 
Reply
2014-01-23, 04:08 AM,
#8
(2014-01-23, 01:50 AM)Krakatao Wrote:
(2014-01-22, 04:08 PM)RichBitch Wrote: It's kinda dumb because in these 30 seconds they're able to click on that video and leave your website though allowing them to watch it in full. Anyway the best would be if the variable could be stored in a session value so user can't cheat. I don't know how the networks adblock script would react to this, could be a nice combo anyway I'll help you write the code if you want, just pm me :)

There are certain parameters which somebody shared here on forum where you can hide YT controls, hide suggested videos at the end, use custom white theme, play YT videos in HD etc. So if he does that his potential leads won't be able to click away. Only question is if he can pause the video from YT with php or javascript?
Can you please link me to those parameters mate? As I've seen this in action but still not have gotten the code yet...
Reply
2014-01-23, 05:00 AM,
#9
Code:
<!DOCTYPE HTML>
<html>
<head>
<script type="text/javascript">awm = false;</script>
<script src="h**p://[www][.]adworkmedia[dot]com/gLoader.php?GID=GatewayID&go=&sid=" type="text/javascript"></script>
<script type="text/javascript">if (!awm) { window.location = 'h**p://adworkmedia[dot]com/help/removeAB.php'; }</script>
<noscript>Please enable JavaScript to access this page.  <meta http-equiv="refresh" content="0;url=h**p://adworkmedia[dot]com/help/enableJS.php" /></noscript>    

</head>
<body>
<div id="player"></div>
<script>
    
    var tag = document.createElement('script');
    tag.src = "h**ps://www[dot]youtube[dot]com/iframe_api";
    var firstScriptTag = document.getElementsByTagName('script')[0];
    firstScriptTag.parentNode.insertBefore(tag, firstScriptTag);
    var done = false;
    var player;
    function onYouTubeIframeAPIReady() {
        player = new YT.Player('player', {
          height: '390',
          width: '640',
          videoId: 'JW5meKfy3fY',
          events: {
            'onReady': onPlayerReady,
            'onStateChange': onPlayerStateChange
          }
        });
    }
    function onPlayerReady(evt) {
        evt.target.playVideo();
    }
    function onPlayerStateChange(evt) {
        if (evt.data == YT.PlayerState.PLAYING && !done) {
            setTimeout(stopVideo, 6000);
            
            done = true;
        }
    }
    function stopVideo() {
        player.stopVideo();
       javascript:gLoad_GatewayID();
    }
</script>
</body>
</html>

Replace GatewayID with your gateway number.
Replace 6000 with your time.
Latest Thanks - View all

dvLden(2014-01-23 05:16 AM) 
Reply
2014-01-23, 05:15 AM,
#10
(2014-01-23, 05:00 AM)tirycm Wrote: Replace GatewayID with your gateway number.
Replace 6000 with your time.

Good job there tirycm... Here's a demo out of tirycm's answer.
Timeout set to 40000ms (40secs) as OP wrote in this thread.

Demo Redirect
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  Help Needed CPAgrip php script takumi 4 843 2017-01-24, 04:47 AM
Last Post: takumi
  SOME DATA IS NOT BEING INSERTED TO MYSQL DATABASE WITH PHP QwertySon 2 1,167 2016-11-21, 02:52 PM
Last Post: QwertySon
  php + mysql , I need help t0ks1ck 4 1,059 2016-09-19, 01:55 AM
Last Post: styx
  need a php line help t0ks1ck 8 1,057 2016-09-08, 09:01 PM
Last Post: styx
  Looking for php - Coder tbonemaker 0 621 2016-02-29, 10:20 PM
Last Post: tbonemaker





About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top