Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $query = $_REQUEST['q'];
- if(preg_match('/youtube/', $query) ) {
- echo file_get_contents( urlencode( $query ) );
- }else{
- echo file_get_contents( 'http://www.youtube.com/watch?v=' . urlencode($query) );
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement