Created
April 23, 2015 20:25
-
-
Save ConnorMcF/a6da09c50a33513ed329 to your computer and use it in GitHub Desktop.
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 | |
$host = 1; // don't allow chat widget to load | |
require('pusher.php'); | |
$app_id = '110645'; | |
$app_key = 'd15708a3ea089b2a9f4d'; | |
$app_secret = '6ca8056c835ca42785b7'; | |
$pusher = new Pusher($app_key, $app_secret, $app_id); | |
$data['ip'] = $_SERVER['REMOTE_ADDR']; | |
$data['songName'] = $_GET["title"]; | |
$data['songAuthor'] = $_GET["author"]; | |
$data['songId'] = $_GET["id"]; | |
$data['songDuration'] = $_GET["duration"]; | |
$data['user'] = $_GET["user"]; | |
$pusher->trigger('notify', 'song', $data); | |
echo("done!"); | |
?> |
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
<iframe height="0" width="0" src="blank.php" style="visibility:hidden;display:none" id="sample"></iframe> | |
<script> | |
var videoData = player.getVideoData(); | |
var title = videoData['title']; | |
var video_id = videoData['video_id']; | |
var author = videoData['author']; | |
var duration = player.getDuration(); | |
var currentduration = player.getCurrentTime(); | |
document.getElementById('sample').src = "heartbeatm8.php?title=" + title + "&author=" + author + "&id=" + video_id + "&duration=" + duration + "¤t=" + currentduration; | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment