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

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -