Jump to content

Recommended Posts

Ok well what I am trying to do is make a you tube grabber that grabs video from you tube.

 

This is my code

 

<?php
$OUTPUT = rand(1000,9999);
$BASEURL = "http://youtube.com/get_video.php?=";
$url = $_POST['url'];
$wget = "/usr/bin/wget";
$tmp = "$OUTPUT.tmp";
$tmp2 = "$OUTPUT";
$txt = "$OUTPUT.txt";
$flv = "$OUTPUT.flv";


$BASEURL = "http://youtube.com/get_video.php?";
$get_base = "$wget $url -O $tmp  > /dev/null 2>&1";
$get_info = "grep watch_fullscreen $tmp > $txt";
$videourl = `sed "s;.*\(video_id.\+\)&title.*;\1;" $txt`;
$fullurl = "$BASEURL $videourl";
$get_flv = "$wget $fullurl -O $flv > /dev/null 2>&1";


if(isset($_POST['Submit']) && $_POST['Submit'] == "Get It")
{
  // Do your popen on the perl script here, along with anything else
} else {
  //Put your form code here, along with a Submit button with a "value" of "Get It"
exec( "$get_base" );
exec( "$get_info" );

exec( "$get_flv" );

echo done;
}






?>

<html>
<body>
<form name="form1" method="post" action="">



<div class="aa"><div class="la">Video IRL</div><div class="ra"><INPUT name="url" type="text" id="url"></div></div>

<div class="aa"><div class="la"> </div><div class="ra"><input type="submit" name="Submit" value="Submit"></div></div>



<div class="aa"></div>







</form>
</body>
</htm>

well I can make it grep the watch full screen but i cant get it to read and strip it so i can do a wget any ideas would be awsom  ;D

Link to comment
https://forums.phpfreaks.com/topic/140374-you-tube-grabber-php-client-side/
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.