javascript - call url from url id instead form -
i have code play google drive video. play when put url in browser form , click play. want remove form , directly play video when user visit url google drive file id.
i want play video url below
mydomain.com/index.php?id=0byard0r0qyatcmw2dvhqs0ndu0u
but not able that. can me please.
below php code
http://i.imgur.com/0lu5rlv.png
my index.php code https://pastebin.com/kugcghk7
<?php error_reporting(0); include "curl_gd.php"; if($_post['submit'] != ""){ $url = $_post['url']; $linkdown = drive($url); $file = '[{"type": "video/mp4", "label": "hd", "file": "'.$linkdown.'"}]'; } ?> <form action="" method="post"> <input type="text" size="80" name="url" value="https://drive.google.com/file/d/0byard0r0qyatcmw2dvhqs0ndu0u/view"/> <input type="submit" value="play" name="submit" /> </form>
if example site : mydomain.com/index.php?id=0byard0r0qyatcmw2dvhqs0ndu0u
you need replace $_post
$_get
construct full url
<?php error_reporting(0); include "curl_gd.php"; if($_get['id'] != ""){ $id = $_get['id']; $url = "https://drive.google.com/file/d/" . $id . "/view/"; $linkdown = drive($url); $file = '[{"type": "video/mp4", "label": "hd", "file":"' .$linkdown. '"}]'; } ?>
Comments
Post a Comment