YOUTUBE VIDEO DOWNLOAD SCRIPT

THIS IS WHOLE PAGE TO CREATE YOUR OWN PERSONAL YOUTUBE VIDEO DOWNLOADER


<!DOCTYPE html>
<html lang="en">
<head>
  <title>Video Downloader</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <!-- for-mobile-apps -->
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>

<link rel="stylesheet" href="assets/dist/css/bootstrap.min.css">
<link rel="stylesheet" href="assets/font/css/font-awesome.css">
<link rel="stylesheet" href="assets/css/jquery-ui.css">
<link rel="stylesheet" href="assets/css/main.css" type="text/css">

</head>
<body>
<?php include_once('header.php');

 include_once('nav.php'); ?>

<div class="col-md-12">
<div class="container">
<div class="table-responsive">
<form action="" method="get">
<table class="table table-bordered table-striped">
<tr>
<td style="vertical-align:middle" align="center">URL</td>
<td style="vertical-align:middle"><input type="text" name="yturl" class="form-control" placeholder="https://www.youtube.com/watch?v=ZQ_KW3KVx40"></td>
<td style="vertical-align:middle" align="center"><input type="submit" class="btn btn-danger"></td>
</tr>

</table>
</form>
</div>
</div>
</div>

<div class="col-md-12">
<?php
if (isset($_GET["yturl"])) {
$url = $_GET["yturl"];
$regex_pattern = "/(youtube.com|youtu.be)\/(watch)?(\?v=)?(\S+)?/";
$match;
if(preg_match($regex_pattern, $url, $match)){
$e=explode('=',$url);
$id = $e[1];
parse_str(file_get_contents('http://www.youtube.com/get_video_info?video_id='.$id), $video_data);
$streams = $video_data['url_encoded_fmt_stream_map'];
$streams = explode(',',$streams);
$cnt=count($streams);
$counter=1;
?>
<div class="col-md-12">
<div class="col-md-6">
<img src="https://img.youtube.com/vi/<?php echo $id; ?>/hqdefault.jpg" />
</div>
<div class="col-md-6">
<table class="table table-bordered">
<tr>
<th>Quality</th>
<th>Type</th>
<th>Action</th>
</tr>
  <?php

    foreach ($streams as $streamdata) {
print_r("<tr>",$counter);
parse_str($streamdata,$streamdata);
ksort($streamdata);
foreach($streamdata as $k => $v){
if($k=="itag"){ $k=""; $v="";}
if($k=="url"){ $v=urldecode($v);
echo '<td><a href="'.$v.'" class="btn btn-danger">Download</a></td>';
}
if($k=="type"){ $v=explode(";",$v); $v=$v[0]; 
echo '<td><strong>'.$v.'</strong></td>';
}
if($k=="quality"){  
echo '<td><strong>'.$v.'</strong></td>';
}
}
$counter = $counter+1;
print_r("</tr>");
}
}
else{ echo "Sorry, not a youtube Video URL"; }
}
?>
</table>
</div>
</div>
</div>



DEPENDENT DROP DOWN LIST USING JQUERY

BASIC DEPENDENT DROP DOWN LIST

1) Create HTML file

<html>
<head>
<title>Dependent Drop-down List Using Jquery</title>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script>
<script src="demo.js">
</script>
</head>
<body>
<form>
<select id="fst">
<option>1</option>
<option>2</option>
</select>
<select id="snd">
</select>
</form>
</body>
</html>

-----------------------------------------------------------------------------

2) jQuery

$(document).ready(function(){
    $("#fst").change(function(){
       var fst = $("#fst").val();
if(fst=="1"){
$('#snd').html("<option>3</option><option>4</option>");
}
if(fst=="2"){
$('#snd').html("<option>5</option><option>6</option>");
}
    });
});

# make new file demo.js

Explanation

To use jQuery have to add jQuery library 
To add jQuery library 
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js">
</script> between head tags.
 add our jquery as external file and add it.

first select box is fst is trigger which trigger jquery and fetch second select box data.

for more details see below video :











FIND THE IP ADDRESS OF A WEBSITE USING COMMAND PROMPT


This Instructable will show you how to find the IP address of of any website you want and find where the IP address originates from. 
And using this method instead of pinging the address shows you the fastest connection speed between servers/connections. 

Btw, tell me how you go using it.


Step 1: Find the IP Address


Open command prompt and type in "tracert" then type in the website for example "tracert www.instructables.com" without these things"". 

The second picture shows what comes up. 

The IP address is what comes up next to where it says "tracing route to (the website you inserted)(the IP address).

Step 2: Tracing the IP Address



To trace where the signal originates from use a website like this and that tells you where it originates from, but to find the company and other things about them use this.

That concludes my instructable.
Don't forget to rate it.
Thanks.