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.

PHP MAIL CODE

Php mail code example hope will help you...
we do this in two part
1. html form which send data
2. php code which give action to send data
see how

Example :- 


1. Html code :-

<form method="post" action="contactdata.php">
<p><label for="author">Your Name:</label>
<input type="text" class="textbox" value="Enter your name here..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Enter your name here...';}" name="name"> </p>
<p><label for="author">Email:</label>
 <input type="text" class="textbox" value="Enter your email here..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}" name="email"> </p>
 <p><label for="author">Message:</label>
<textarea value="Enter your message here..." onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Message';}" name="msg">Enter your message here...</textarea> </p>
<input name="submit" type="submit" id="submit" value="Submit">
 </form>




Now we are going to create php code file name contactdata.php


                   <?php 
 $to = "youremail@domain.com";  // modify with your email id
 $from = $_REQUEST['email'] ; 
 $name = $_REQUEST['name'] ; 
 $headers = "From: $from"; 
 $subject = "Site Contact Form"; 

 $fields = array(); 
 $fields{"name"} = "name"; 
 $fields{"email"} = "email"; 
 $fields{"msg"} = "msg"; 

 $body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST[$a]); } 

 $headers2 = "From: noreply@YourCompany.com"; 

 $subject2 = "Thank you for contacting us"; 

 $autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usualy within 48 hours. If you have any more questions, please consult our website at www.yourwebsite.com";


 if($from == '') {print "You have not entered an email, please go back and try again";} 
 else { 
 if($name == '') {print "You have not entered a name, please go back and try again";} 
 else { 
 $send = mail($to, $subject, $body, $headers); 
 $send2 = mail($from, $subject2, $autoreply, $headers2); 
 if($send) 
 {print "<span class='color'>Thank You for your FeedBack. <a href='your homepage link'>Click Here</a> to go back home page</span>";} 
 else 
 {print "Sorry Your Message Is Not Delivered. Email Us At : youremail@domain.com";} 
 }
}
 ?> 

Free Responsive HTML5 CSS3 Website Templates

Free Responsive HTML5 CSS3 Website Templates

looking for Responsive website templates ? this is right place for free Responsive templates

Download the latest CSS3 Responsive website templates provided by w3layouts. This templates are Mobile friendly and cross device supportive. Download and start your website which is responsive and looks good in Mobile or Tablate. By using this responsive website templates you can avoid building seperate website for Mobile devices.