Added BASH: wget for Rapidshare
This commit is contained in:
parent
8b90d2dbc0
commit
ec7178a8fb
|
@ -0,0 +1,12 @@
|
|||
#!/bin/bash
|
||||
###
|
||||
## Usage: ./<script> <user> <login> <downloadlist>
|
||||
##
|
||||
## Note: Requires RS User account and setting "Direct Downloads" set to yes.
|
||||
###
|
||||
|
||||
rapidshare_cookie=`wget -q -O - --post-data="sub=getaccountdetails&withcookie=1&login=$1&password=$2" https://api.rapidshare.com/cgi-bin/rsapi.cgi | grep cookie | cut -d= -f2`
|
||||
|
||||
for i in $( cat $3); do
|
||||
wget --header="Cookie: enc=$rapidshare_cookie" $i
|
||||
done
|
|
@ -58,8 +58,8 @@ function file_get_contents_curl($url, $agent = "My Agent"){
|
|||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set curl to return the data instead of printing it to the browser.
|
||||
curl_setopt($ch, CURLOPT_USERAGENT, $agent);
|
||||
curl_setopt($ch, CURLOPT_URL, $url);
|
||||
|
||||
$data = curl_exec($ch);
|
||||
|
||||
$data = curl_exec($ch);
|
||||
$header = curl_getinfo($ch);
|
||||
|
||||
curl_close($ch);
|
||||
|
|
Reference in New Issue