Selling rlslog, oneddl, adultbay, hq-uploads, sceneflux auto leecher - $30

Status
Not open for further replies.

Yawn92

Active Member
392
2010
0
0
Hi all, this is a straightforward script to auto leech and reupload rlslog + sceneflux + oneddl + hq-uploads + adultbay + scenerls topics. Simply put in 1 or more topic urls, press leech then just leave it and the contents will be leeched to a multitude of hosts, post created and saved to your server. It does not auto post them to forums, you have to do that yourself.

Features:
-Auto create the post with information in bbcode or html from a rlslog/sceneflux/oneddl/hq-uploads/adultbay/scenerls post

-Leech the first set of alive rapidshare, megaupload or hotfile links to rapidshare, megaupload, hotfile, fileserve and netload (You do not need premium accounts in any of these filehosts to upload to them)

-Optionally unrar the downloaded files, remove any files you do not want and add a file in of your choice, then re-rar and upload.

-Log file creation so you can see where the script is at.

-Optionally change the MD5 and rename the files you are leeching

-Optionally delete the files you are leeching once they have been reuploaded

-Optionally email the contents of the completed post to an email of your choice

-Optionally add your own download and information icons to finished posts

-Free lifetime updates and patches, notification of which will be sent to your payment email

-The entire thing is automated, all you need to do is enter links (or use the built in automated script to get source links), press a button then post the results to forums of your choice once the files have been re-uploaded.


The price? $30, paypal is preferred, but moneybookers can also be arranged. If you're even considering it, buy it, you won't find anything else like this for under $100-$200 - you're getting a really good deal.

If you need to leech from a blog not supported by default I can write you a custom plugin for an additional $10. If you want to add an additional upload or download filehost then I can do that as well for an additional $20.

Need some good, affordable hosting to run this on? Try startech-hosting:
30 gb space
512mb burst ram
unmetered bw
http://startech-hosting.com/cart.php?a=add&pid=19


Requirements:
-To run this you will need a server with php and curl support
-If using the rar/unrar option your server will need winrar installed.


Any questions please feel free to PM me or ask in this post :)
 
1,509 comments
@Yawn

All scene releases a day are around 80GB a day though, would be best to support leeching from other hosts (still recommend netload), you'd need a shitload of rs accounts :(
 
Yawn , thats a future Request -- How about to make Script Name Movies by site name for example : armt.info-blabla.avi :)
 
Thank you so much :D.

I was talking to Elio about this idea the other day in the shoutbox. I don't have the time to manage it but I could add a plugin to HQ-Uploads.com which would output the contents of the posts in code like an advanced RSS feed. Basically if you went to something like http://www.hq-uploads.com/leech/?topic=12345

it would output something like this:
Code:
<result method="files.getinfo" status="good">
	<id>12345</id>
	<title>Iron Man 2 (2010) DVDRIP - MENTiON</title>
	<cover>http://i.imgur.com/1C5zj.jpg</cover>
	<info>http://nfomation.net/info/1276028358.dupli-si.1080p.nfo</info>
	<imdb>http://www.imdb.com/title/tt1228705/</imdb>
	<screen>http://i.imgur.com/t2zKJ.jpg
http://i.imgur.com/WREbV.jpg
http://i.imgur.com/V4LZR.jpg</screen>
	<sample> http://rapidshare.com/files/280396974/sample.html</sample>
	<description>With the world now aware of his dual life as the armored superhero Iron Man, billionaire inventor Tony Stark faces pressure from the government, the press, and the public to share his technology with the military. Unwilling to let go of his invention, Stark, along with Pepper Potts, and James "Rhodey" Rhodes at his side, must forge new alliances - and confront powerful enemies.</description>
	<download>http://rapidshare.com/files/385628609/HQ-Uploads.com_i-iron.part01.rar.html
http://rapidshare.com/files/385628624/HQ-Uploads.com_i-iron.part02.rar.html
http://rapidshare.com/files/385628989/HQ-Uploads.com_i-iron.part03.rar.html
http://rapidshare.com/files/385629005/HQ-Uploads.com_i-iron.part04.rar.html
http://rapidshare.com/files/385629340/HQ-Uploads.com_i-iron.part05.rar.html
http://rapidshare.com/files/385629412/HQ-Uploads.com_i-iron.part06.rar.html
http://rapidshare.com/files/385629743/HQ-Uploads.com_i-iron.part07.rar.html
http://rapidshare.com/files/385629886/HQ-Uploads.com_i-iron.part08.rar.html
http://rapidshare.com/files/385630115/HQ-Uploads.com_i-iron.part09.rar.html
http://rapidshare.com/files/385630264/HQ-Uploads.com_i-iron.part10.rar.html
http://rapidshare.com/files/385630479/HQ-Uploads.com_i-iron.part11.rar.html
http://rapidshare.com/files/385630656/HQ-Uploads.com_i-iron.part12.rar.html
http://rapidshare.com/files/385630850/HQ-Uploads.com_i-iron.part13.rar.html
http://rapidshare.com/files/385630699/HQ-Uploads.com_i-iron.part14.rar.html
http://hotfile.com/dl/42191409/5581280/HQ-Uploads.com_i-iron.part01.rar.html
http://hotfile.com/dl/42191402/c76fe79/HQ-Uploads.com_i-iron.part02.rar.html
http://hotfile.com/dl/42191533/1e076fa/HQ-Uploads.com_i-iron.part03.rar.html
http://hotfile.com/dl/42191530/da2e6ac/HQ-Uploads.com_i-iron.part04.rar.html
http://hotfile.com/dl/42191723/9eea9a8/HQ-Uploads.com_i-iron.part05.rar.html
http://hotfile.com/dl/42191777/69e336a/HQ-Uploads.com_i-iron.part06.rar.html
http://hotfile.com/dl/42191920/acf0c28/HQ-Uploads.com_i-iron.part07.rar.html
http://hotfile.com/dl/42191911/bee6f1d/HQ-Uploads.com_i-iron.part08.rar.html
http://hotfile.com/dl/42192101/63daec4/HQ-Uploads.com_i-iron.part09.rar.html
http://hotfile.com/dl/42192118/ba69dc2/HQ-Uploads.com_i-iron.part10.rar.html
http://hotfile.com/dl/42192282/36902ce/HQ-Uploads.com_i-iron.part11.rar.html
http://hotfile.com/dl/42192298/2b778df/HQ-Uploads.com_i-iron.part12.rar.html
http://hotfile.com/dl/42192463/7032745/HQ-Uploads.com_i-iron.part13.rar.html
http://hotfile.com/dl/42192317/5401dd7/HQ-Uploads.com_i-iron.part14.rar.html</download>
</result>

That's of course if Mr-R-T is ok with this and I'm sure he is as this would greatly reduce the load on his server and make it a lot more accurate for people to leech from him.

Mr-R-T wouldn't have to do any extra work either as it's all in the DB already.
 
m8 from the last update i am unable to open logs in vps directly i have to type the link like xxx.com/logs/etc and the title isnt being formatted properly its oneddl in the title as well in the log <title> is shown before the name of the file....
 
Yawn, New update fails!

Code:
[B]<title>Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx | OneDDL - One Stop Rapidshare Links[/B]

[img][URL]http://static.img4tw.com/i/53c5ba0e.jpg[/URL][/img]

[B]nFO:[/B][code][URL]http://nfomation.net/info/1276037498.rx-httm-r5.nfo[/URL]

Rapidshare:
Code:
[URL]http://rapidshare.com/files/396998301/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part1.rar[/URL]
[URL]http://rapidshare.com/files/396999406/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part2.rar[/URL]
[URL]http://rapidshare.com/files/397000511/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part3.rar[/URL]
[URL]http://rapidshare.com/files/397001545/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part4.rar[/URL]
[URL]http://rapidshare.com/files/397002538/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part5.rar[/URL]
[URL]http://rapidshare.com/files/397003357/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part6.rar[/URL]
[URL]http://rapidshare.com/files/397004277/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part7.rar[/URL]
[URL="http://rapidshare.com/files/397004672/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part8.rar%5B/code"]http://rapidshare.com/files/397004672/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part8.rar[/code[/URL]]
[B]Hotfile:[/B]
[code][URL]http://hotfile.com/dl/47264416/6cc8b87/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part1.rar.html[/URL]
[URL]http://hotfile.com/dl/47264935/f6309fe/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part2.rar.html[/URL]
[URL]http://hotfile.com/dl/47265348/c336d62/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part3.rar.html[/URL]
[URL]http://hotfile.com/dl/47265851/e82f1ef/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part4.rar.html[/URL]
[URL]http://hotfile.com/dl/47266273/d1f0fc7/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part5.rar.html[/URL]
[URL]http://hotfile.com/dl/47266659/f981ec7/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part6.rar.html[/URL]
[URL]http://hotfile.com/dl/47267167/039dc0b/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part7.rar.html[/URL]
[URL="http://hotfile.com/dl/47267227/1f9a8c2/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part8.rar.html%5B/code%5D"]http://hotfile.com/dl/47267227/1f9a8c2/_title_Hot.Tub.Time.Machine.2010.R5.LiNE.XviD-Rx___OneDDL_-_One_Stop_Rapidshare_Links.war.part8.rar.html[/URL]
[/code]


Code:
[B]<title>National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM  | OneDDL - One Stop Rapidshare Links[/B]

[img][URL]http://static.img4tw.com/i/1be9adca.png[/URL][/img]

It’s one of America’s biggest environmental disasters and the largest oil slick in the Gulf of Mexico since 1979. As experts scramble to stop the leak, find out what happened to the oil rig Deepwater Horizon as a blowout tore it apart, killing 11 of 126 men on board and sending oil toward Louisiana, Mississippi, Alabama and Florida coastlines. The special contains never-before-seen footage obtained from the U.S. Coast Guard, NGC’s production crew and emergency response crews of the aftermath.

[B]Rapidshare:[/B]
[code][URL]http://rapidshare.com/files/396993118/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part1.rar[/URL]
[URL]http://rapidshare.com/files/396994040/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part2.rar[/URL]
[URL]http://rapidshare.com/files/396995155/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part3.rar[/URL]
[URL]http://rapidshare.com/files/396996279/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part4.rar[/URL]
[URL]http://rapidshare.com/files/396997597/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part5.rar[/URL]
[URL="http://rapidshare.com/files/396998527/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part6.rar%5B/code"]http://rapidshare.com/files/396998527/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part6.rar[/code[/URL]]
[B]Hotfile:[/B]

[code][URL]http://hotfile.com/dl/47262211/bef1bec/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part1.rar.html[/URL]
[URL]http://hotfile.com/dl/47262648/98f821b/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part2.rar.html[/URL]
[URL]http://hotfile.com/dl/47263033/44e2e96/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part3.rar.html[/URL]
[URL]http://hotfile.com/dl/47263640/c38e756/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part4.rar.html[/URL]
[URL]http://hotfile.com/dl/47264170/bd18f67/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part5.rar.html[/URL]
[URL="http://hotfile.com/dl/47264534/e28e2a9/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part6.rar.html%5B/code%5D"]http://hotfile.com/dl/47264534/e28e2a9/_title_National.Geographic.Gulf.Oil.Spill.720p.HDTV.x264-MOMENTUM____OneDDL_-_One_Stop_Ra.part6.rar.html[/URL]
[/code]

WTF is wrong with the file url's :O It won't remove ONEDDL shit and also wont add my url >.<
 
@Yawn

All scene releases a day are around 80GB a day though, would be best to support leeching from other hosts (still recommend netload), you'd need a shitload of rs accounts :(
If you leech during RS happy hour you have 50gb of bandwidth a day to use, plus you can buy RS accounts on WJ for like $3 if you wanted to get more.

Originally Posted by Yawn92
Maybe, if I adapt the source of rapidleech. I can't guarantee anything right now though, but I'd like to be able to add it.
do you mean the source code for the 2gb rs plugin?
Yup.

@tehlolkid
The title bit is my fault, although I'm sure why it's only happening now :/

As for the site url, RS has a cap of 100 characters in the filename, and the script is trimming the filename after the site url is added meaning the bit it chops of is your site url. Will get this fixed when I can.

Just got home from one exam, need to revise lots for my next one on, I won't be able to do any work on this script until then, sorry.
 
will be great if you add ability for it to leech 1 time and upload 2 or more times

for example leeched avatar movie and someone wants to upload it on 3sites

would be great if you made it upload the 3 times respectively not to leech everytime
 
will be great if you add ability for it to leech 1 time and upload 2 or more times

for example leeched avatar movie and someone wants to upload it on 3sites

would be great if you made it upload the 3 times respectively not to leech everytime


this is exactly what I need, pmd him 3 days ego and he said he will work on it after his papers ;)
 
Hey again,

I got my host to do what you said, still the same problem :|, maybe get the scripts raring option to work the same as rapidleech? that should get things working properly.
 
will be great if you add ability for it to leech 1 time and upload 2 or more times

for example leeched avatar movie and someone wants to upload it on 3sites

would be great if you made it upload the 3 times respectively not to leech everytime

3 File Hosting sites? Isn't that supported?

Hey again,

I got my host to do what you said, still the same problem :|, maybe get the scripts raring option to work the same as rapidleech? that should get things working properly.

Mind to list the steps that you told your host to make? RARing feature works here for me.
 
Rapidleech is using different rar system. To install rar on your system a simple and easy way is to save a file as somename.sh with below code:
Code:
#!/bin/bash
# simple bash script that will install rar
# By www.vpsgeek.info
echo "This script will install rar on your box"
# move to a temp director
cd /tmp
# detecting the architecture
if $(uname -a | grep 'x86_64'); then
echo "this is 64 bit os, so lets install 64bit winrar"
wget http://rarlab.com/rar/rarlinux-x64-3.8.0.tar.gz
tar -zxvf rarlinux-x64-3.8.0.tar.gz
cd rar
./unrar
else
echo "this is 32 bit os, so lets install 32bit winrar"
wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz
tar -zxvf rarlinux-3.8.0.tar.gz
cd rar
./unrar
fi
cp rar unrar /bin
echo "rar sucessfully installed"

and run in SSH it will install rar for you.
 
Code:
<?php

//Input your RS.com username and password. Also make sure to set your account type properly (premium or collector) with the $zone variable below.
$site_login = '';
$site_pass = '';
$zone = 'prem';        //prem|col



/////////////////////////////////////////////////
$not_done=true;
$continue_up=false;
if ($site_login && $site_pass)
{
    $_REQUEST['my_login'] = $site_login;
    $_REQUEST['my_pass'] = $site_pass;
    $_REQUEST['action'] = "FORM";
    echo "<center><b>Use Default login/pass...</b></center>\n";
}
if ($_REQUEST['action'] == "FORM")
{
    $continue_up=true;
}
else
{
    echo <<<EOF
    <div id=login width=100% align=center>Login to Site</div>
    <table border=0 style="width:350px;" cellspacing=0 align=center>
    <form method=post>
        <input type=hidden name=action value='FORM' />
        <tr><td nowrap>&nbsp;Username*</td><td>&nbsp;<input type=text name=my_login value='' style="width:160px;" />&nbsp;</td></tr>
        <tr><td nowrap>&nbsp;Password*</td><td>&nbsp;<input type=password name=my_pass value='' style="width:160px;" />&nbsp;</td></tr>
        <tr><td colspan=2 align=center><input type=submit value='Upload'></td></tr>
    </form>
</table>
EOF;
}

if ($continue_up)
{
    $not_done = false;

    if ( empty($_REQUEST['my_login']) || empty($_REQUEST['my_pass']) ) html_error('No user and pass given', 0);
    echo "<script>document.getElementById('login').style.display='none';</script>";

    /////Only change the values below if you know what you are doing, or if you want to experiment!
    
    class RS
    {
        var $file;    // the full path to the file we want to upload
        var $filename;    // extracted from $this->file ( see getfilesize() )
        var $zone = 'prem';    // set to 'prem' or 'col' depending on your account type. Use premium account-type by default. You should do this from the same area as where you set your login and pass above!
        var $login;
        var $password;
        var $uploadpath = 'l3';    // depending on your [server|pc] location you can change this to any of the carriers rs.com uses such as 'cg' or others
        var $uploadserver;    // This is the next upload server number e.g. 530. Don't confuse with $uploadpath!
        var $fulluploadserver = array();    // an array resulting from a parse_url of the combined details above
        var $fsize;    // the size of the file we're uploading
        var $wantchunksize = 1000000;    // you might want to leave this as default! (rapidshare don't allow anything below this anyway, but you could try increasing it if you have very large files to upload)
        var $contentheader;
        var $boundary = '---------------------632865735RS4EVER5675865';
        var $useragent = 'RAPIDSHARE MANAGER Application Version: NOT INSTALLED VERSION STARTED';
        var $resumed = 0;
        var $complete = 0;
        var $replacefileid;
        var $replacekillcode;
        var $fileid;
        var $killcode;
        var $download_link;
        var $delete_link;


        function __construct($filename)
        {
            $this->login = trim($_REQUEST['my_login']);
            $this->password = trim($_REQUEST['my_pass']);
            $this->getfilesize($filename);
            $this->getuploadserver();
        }

        function getfilesize($filename)
        {
            $this->file = realpath($filename);
            if (!($this->fsize = filesize($this->file))) die("File $this->file is empty or does not exist!\r\n");
            $this->filename = basename($this->file);
            echo "Filesize: " . $this->fsize;
            //$this->wantchunksize = GetChunkSize($this->fsize);
        }

        function getuploadserver()
        {
            if (!($data = file_get_contents('http://rapidshare.com/cgi-bin/rsapi.cgi?sub=nextuploadserver_v1'))) die ("Unable to get next upload server!");
            if (!preg_match('/(\d+)/', $data, $uploadserver)) die ("Uploadserver invalid? Internal error!\r\n");
            $this->uploadserver = $uploadserver[1];
            $this->fulluploadserver = parse_url('http://rs' . $this->uploadserver . $this->uploadpath . '.rapidshare.com');
        }

        function upload()
        {
            require (TEMPLATE_DIR . '/uploadui.php');
            $timeStart = getmicrotime ();
            if (!($fh = fopen($this->file, 'r'))) die('Unable to open file: ' . $this->filename);
            $rsip = gethostbyname($this->fulluploadserver['host']);
            $cursize = 0;
            while ($cursize < $this->fsize)
            {
                if ($this->fsize > $this->wantchunksize)
                {
                    $chunksize = $this->fsize - $cursize;
                    if ($chunksize > $this->wantchunksize)
                    {
                        $chunksize = $this->wantchunksize;
                    }
                    else
                    {
                        $this->complete = 1;
                    }
                }
                else
                {
                    $chunksize = $this->fsize;
                    $this->complete = 1;
                }

                print "Upload chunk is $chunksize bytes starting at $cursize...<br />";

                $this->contentheader = "$this->boundary\r\nContent-Disposition: form-data; name=\"rsapi_v1\"\r\n\r\n1\r\n";

                if ($this->resumed)
                {
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"fileid\"\r\n\r\n$this->fileid\r\n";
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"killcode\"\r\n\r\n$this->killcode\r\n";
                    if ($this->complete) $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"complete\"\r\n\r\n1\r\n";
                }

                if (!$this->resumed && $this->zone == "prem" && $this->login && $this->password)
                {
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"login\"\r\n\r\n$this->login\r\n";
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n$this->password\r\n";
                }

                if (!$this->resumed && $this->zone == "col" && $this->login && $this->password)
                {
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"freeaccountid\"\r\n\r\n$this->login\r\n";
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"password\"\r\n\r\n$this->password\r\n";
                }

                /*if (!$this->resumed)
                {
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"replacefileid\"\r\n\r\n$this->replacefileid\r\n";
                    $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"replacekillcode\"\r\n\r\n$this->replacekillcode\r\n";
                }*/

                if (!$this->complete) $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"incomplete\"\r\n\r\n1\r\n";

                $this->contentheader .= "$this->boundary\r\nContent-Disposition: form-data; name=\"filecontent\"; filename=\"$this->filename\"\r\n\r\n";
                $contenttail = "\r\n$this->boundary--\r\n";
                $contentlength = strlen($this->contentheader) + $chunksize + strlen($contenttail);
                $header = 'POST /cgi-bin/' . ($this->resumed ? 'uploadresume.cgi' : 'upload.cgi') . " HTTP/1.1\r\nContent-Type: multipart/form-data; boundary=$this->boundary\r\nContent-Length: $contentlength\r\nUser-Agent: $this->useragent\r\n\r\n";

                //echo ftell($fh) . '<br />';
                //fseek($fh, $cursize, 0);
                //echo ftell($fh) . '<br />';
                $socket = fsockopen($rsip, 80, $errno, $errstr, 30) or die ("Unable to open socket: $errstr");
                fwrite($socket, "$header$this->contentheader");
                $buffer = fread($fh, $this->wantchunksize);
                $bufferlen = strlen($buffer);
                $cursize += $bufferlen;
                $sentbytes = fwrite($socket, "$buffer");
                echo "Bytes written: $sentbytes<br />";
                $time = getmicrotime () - $timeStart;
                $chunkTime = $time - $lastChunkTime;
                $chunkTime = $chunkTime ? $chunkTime : 1;
                $lastChunkTime = $time;
                $speed = round ( $sentbytes / 1024 / $chunkTime, 2 );
                $percent = round ( $cursize / $this->fsize*100, 2 );
                fwrite($socket, $contenttail);
                fflush($socket);

                //$result = '';
                //while(!feof($socket)) $result .= fgets($socket, 256);
                //file_put_contents('rsresult.log', $result, FILE_APPEND);

                echo "<script type='text/javascript' language='javascript'>pr('" . $percent . "', '" . bytesToKbOrMb ( $cursize ) . "', '" . $speed . "');</script>\n";
                flush();

                if (!$this->resumed)
                {
                    $result = '';
                    while(!feof($socket)) $result .= fgets($socket, 128);
                    if (!$result) die("Ooops! Did not receive any valid rapidshare server results?");
                    preg_match('#/files/(\d+)/#', $result, $fileid);
                    preg_match('#killcode=(\d+)\r?\n#', $result, $killcode);
                    preg_match('%http://rapidshare\.com/((?!killcode).)+html%i', $result, $flink);
                    preg_match('%http://rapidshare\.com/.*killcode.*%i', $result, $dlink);
                    $this->download_link = trim($flink[0]);
                    $this->delete_link = trim($dlink[0]);
                    $this->fileid = $fileid[1];
                    $this->killcode = $killcode[1];
                    $this->resumed = 1;
                }
                //$this->contentheader = '';
                fclose($socket);
            }
            fclose($fh);
        }
    }

    //initiate the RS uploader class
    $rs = new RS($lfile);

    //did the user set their account type?
    if ($zone) $rs->zone = $zone;

    //upload the file
    $rs->upload();
    
    echo "<script>document.getElementById('progressblock').style.display='none';</script>";
    $download_link = $rs->download_link;
    $delete_link = $rs->delete_link;
}
?>
 
Status
Not open for further replies.
Back
Top