This file contains hidden or 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
<div class="video-item"> | |
<iframe id="video0" src="//www.youtube.com/embed/4DMGfbje7NY?enablejsapi=1&html5=1" frameborder="0" allowfullscreen></iframe> | |
<button class="play">Play</button> | |
<button class="stop">Stop</button> | |
</div> | |
<div class="video-item"> | |
<iframe id="video1" src="//www.youtube.com/embed/nJl-qVoEEJI?enablejsapi=1&html5=1" frameborder="0" allowfullscreen></iframe> | |
<button class="play">Play</button> | |
<button class="stop">Stop</button> |
This file contains hidden or 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 | |
header('Content-Type: application/json'); | |
//Make sure that it is a POST request. | |
if (strcasecmp($_SERVER['REQUEST_METHOD'], 'POST') != 0) { | |
echo json_encode(array("error" => 'Request method must be POST!')); | |
} | |
//Make sure that the content type of the POST request has been set to application/json | |
$contentType = isset($_SERVER["CONTENT_TYPE"]) ? trim($_SERVER["CONTENT_TYPE"]) : ''; |
OlderNewer