Results 1 to 3 of 3
-
13th Dec 2010, 10:55 AM #1OPMember
Simple download from RS & extract
I download movies to remote upload to moviehosts.
I used to use command line to do it all, but got around to making it easier
I made a simple script that
- Downloads RS links.
- Extracts rar's
- Deletes orignal .rar's and Junk files
- Displays finished movie file URL
Create a folder & CMOD to 777
http://www.g-loaded.eu/2010/10/04/rs...apidshare-api/
save the py script to rs.py (enter your RS premium details in config)
Save the following to index.php
PHP Code:<?
$files = glob("{*.avi,*.mkv,*.mp4}", GLOB_BRACE);
foreach($files as $file)
{
echo "<a href='".substr("http://".$_SERVER['HTTP_HOST'].$_SERVER['PHP_SELF']."",0,-9)."$file'>$file</a><br />";
}
if(empty($_POST))
{
?>
RS links<br /><form method="post" action=""><textarea name="links" style="width:400px;height:250px;"></textarea><br/><input type="submit" value="Submit"/></form>
<?
} else {
$links = array();
preg_match_all("/http:\/\/rapidshare\.com\/files\/[0-9A-Za-z]+\/[-_.0-9A-Za-z]+/i", $_POST['links'], $matches, PREG_SET_ORDER);
foreach($matches as $link)
{
$links[] = $link[0];
$filename = getfilename($link[0]);
echo "Downloading : ".$filename."<br />";
shell_exec("python rs.py " . $link[0] . "");
}
echo "<br />Extracting<br />";
$filename = getfilename($link[0]);
shell_exec("rar e " . $filename . "");
echo "Done - Deleting rars<br />";
foreach($matches as $link)
{
$links[] = $link[0];
$filename = getfilename($link[0]);
unlink($filename);
}
$files = glob("{*.txt,*.url,*.nfo,*.jpg}", GLOB_BRACE);
foreach($files as $file)
{
unlink($file);
}
echo "Finished";
}
function getfilename($link)
{
$startpos = strripos($link, "/");
$endpos = strlen($link);
$theid = substr($link, ($startpos + 1), ($endpos - $startpos));
return $theid;
}
?>Gavo Reviewed by Gavo on . Simple download from RS & extract I download movies to remote upload to moviehosts. I used to use command line to do it all, but got around to making it easier :) I made a simple script that Downloads RS links. Extracts rar's Deletes orignal .rar's and Junk files Displays finished movie file URL Rating: 5
-
13th Dec 2010, 07:00 PM #2Member
You can make this even smaller by removing your getfilename() function and using basename() instead
-
14th Dec 2010, 10:27 AM #3OPMember
I checked out basename when i was making it, but couldnt be bothered to see how it handled special chars etc, so used the function I had
I updated it a bit to remove more junk files and list completed movies
Sponsored Links
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
FileDownloads.org - Simple Pay-Per-Download Program
By FileHosting in forum File Hosts Official SupportReplies: 505Last Post: 17th Nov 2012, 01:00 PM -
extract tar
By accyuklad in forum Server ManagementReplies: 2Last Post: 5th Oct 2011, 08:48 AM -
tar.gz extract
By praveer in forum Technical Help Desk SupportReplies: 7Last Post: 30th Jul 2011, 05:11 PM -
sSKKa's New Simple Download Buttons
By sSKKa in forum Graphics AreaReplies: 23Last Post: 10th Apr 2011, 12:16 PM -
Simple Download Bars (PSD Inc.)
By Ezeh in forum Graphics AreaReplies: 4Last Post: 7th Nov 2010, 05:14 PM
themaPoster - post to forums and...
Version 5.22 released. Open older version (or...