Status
Not open for further replies.
function upFS($value, $fs_user, $fs_password) {
$post = array();
$post["autoLogin"] = true;
$post["loginUserName"] = $fs_user;
$post["loginUserPassword"] = $fs_password;
$post["loginFormSubmit"] = TRUE;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://fileserve.com/login.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://www.fileserve.com/login.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
$result1 = curl_exec ($ch);
curl_close ($ch);
$result = $result1;
//echo $result."<br />";
preg_match("/cookie=[a-zA-Z0-9%]+/i", $result, $matches);
$doughnut = $matches[0]; //This is the cookie
//echo $doughnut."<br />";
$result = postHost("http://www.fileserve.com/", "", $doughnut);
preg_match('/id="uploadHostURL" value="(.+?)"/', $result, $matches);
$uploadHostURL = $matches[1];
preg_match('/id="userId" value="(.+?)"/', $result, $matches);
$userId = $matches[1];
$result = postHost("http://www.fileserve.com/upload-track.php", "", $doughnut);
preg_match('/sessionId":"(.+?)"/', $result, $matches);
$sessionId = $matches[1];
$action_url = "http://".$uploadHostURL."/upload/upload.php?X-Progress-ID=".$sessionId;
preg_match('/fs(.+?)u/', $uploadHostURL, $matches);
$serverID = $matches[1];
$post = array();
$post["affiliateId"] = "";
$post["subAffiliateId"] = "";
$post["landingId"] = "";
$post["userId"] = $userId;
$post["uploadSessionId"] = $sessionId;
$post["uploadHostURL"] = $uploadHostURL;
$post["serverId"] = $serverID;
$post["file"] = "@$value";
$uploadThis = postHost($action_url, $post, $doughnut);
$result = postHost("http://www.fileserve.com/upload-result.php", "uploadSessionId[]=$sessionId", $doughnut);
preg_match("/http:\/\/www.fileserve.com\/file\/[0-9a-zA-Z]+/i", $result, $matches);
if ($matches[0]==null){$link=null;}
else{$link = $matches[0]."/".basename($value);}
return $link;
}


this is my...please help to mod it :D
 
function upFS($value, $fs_user, $fs_password) {
$post = array();
$post["autoLogin"] = true;
$post["loginUserName"] = $fs_user;
$post["loginUserPassword"] = $fs_password;
$post["loginFormSubmit"] = TRUE;

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://fileserve.com/login.php");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
curl_setopt($ch, CURLOPT_HEADER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
curl_setopt($ch, CURLOPT_REFERER, "http://www.fileserve.com/login.php");
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
$result1 = curl_exec ($ch);
curl_close ($ch);
$result = $result1;
//echo $result."<br />";
preg_match("/cookie=[a-zA-Z0-9%]+/i", $result, $matches);
$doughnut = $matches[0]; //This is the cookie
//echo $doughnut."<br />";
$result = postHost("http://www.fileserve.com/", "", $doughnut);
preg_match('/id="uploadHostURL" value="(.+?)"/', $result, $matches);
$uploadHostURL = $matches[1];
preg_match('/id="userId" value="(.+?)"/', $result, $matches);
$userId = $matches[1];
$result = postHost("http://www.fileserve.com/upload-track.php", "", $doughnut);
preg_match('/sessionId":"(.+?)"/', $result, $matches);
$sessionId = $matches[1];
$action_url = "http://".$uploadHostURL."/upload/upload.php?X-Progress-ID=".$sessionId;
preg_match('/fs(.+?)u/', $uploadHostURL, $matches);
$serverID = $matches[1];
$post = array();
$post["affiliateId"] = "";
$post["subAffiliateId"] = "";
$post["landingId"] = "";
$post["userId"] = $userId;
$post["uploadSessionId"] = $sessionId;
$post["uploadHostURL"] = $uploadHostURL;
$post["serverId"] = $serverID;
$post["file"] = "@$value";
$uploadThis = postHost($action_url, $post, $doughnut);
$result = postHost("http://www.fileserve.com/upload-result.php", "uploadSessionId[]=$sessionId", $doughnut);
preg_match("/http:\/\/www.fileserve.com\/file\/[0-9a-zA-Z]+/i", $result, $matches);
if ($matches[0]==null){$link=null;}
else{$link = $matches[0]."/".basename($value);}
return $link;
}


this is my...please help to mod it :D
Check out this by mraza: http://paste2.org/p/1572481



My scripts are working fine since May without doing any kinda of change :O
No sborg/rapidleech btw.
Your script probably uploads via FTP ;)
 
I have phpuploader modified by me, but now trying to download from fileserve always show me error, anyone have the same problem or the solution?

Thanks in advance.
 
Delete the cookie files, then try again. If it doesn't work, let me know and I'll post an appropriate download code for Fileserve. You'll have to modify it to make it work with Fileserve, though, because I won't have the time to look through phpUploader.
 
I guess this should help!

Upload to FS function:
PHP:
        function upFS($filelocation, $fs_user, $fs_password) {
            $post = array();
            $post["autoLogin"] = true;
            $post["loginUserName"] = $fs_user;
            $post["loginUserPassword"] = $fs_password;
            $post["loginFormSubmit"] = "LOGIN";

            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, "http://fileserve.com/login.php");
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
            curl_setopt($ch, CURLOPT_REFERER, "http://www.fileserve.com/");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
            $result = curl_exec($ch);
            curl_close($ch);
            preg_match("/cookie=[a-zA-Z0-9%]+/i", $result, $matches);
            $doughnut = $matches[0]; //This is the cookie

            $result = postHost("http://www.fileserve.com/", "", $doughnut);
            preg_match('#action="http://upload.fileserve.com/upload/(.*)"#', $result, $matches);
            $rnd = time() . rndNum(3);
            $rnd_id = rndNum(5);
            $server = 'http://upload.fileserve.com/upload/' . $matches[1];
            $page = postHost($server . "?callback=jsonp" . $rnd . "&_=" . $rnd_id, "", $doughnut);

            preg_match('#sessionId\:\'(.*)\'}#', $page, $match);
            $uploadSessionId = $match[1].'/';

            $postfields = array();
            $postfields['file'] = "@$filelocation";
            $page = postHost($server . $uploadSessionId, $postfields, $doughnut);
            preg_match('#"shortenCode":"(.*)"}#', $page, $match);
            $linkId = $match[1];

            if ($match[1])
                $downloadlink = 'http://www.fileserve.com/file/' . $match[1];
            else
                $downloadlink = FALSE;

            return $downloadlink;
        }
Random number generator and Curl functions:

PHP:
 function rndNum($lg) {
            $str = "0123456789";
            for ($i = 1; $i<=$lg; $i++) {
                $st = rand(0, 9);
                $pnt = substr($str, $st, 1);
            }
            return $pnt;
        }

        function postHost($link, $postfields = '', $cookie = '') {
            $ch = curl_init($link);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_REFERER, 'http://www.fileserve.com/');
            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
            if ($postfields) {
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
            }
            if ($cookie) {
                curl_setopt($ch, CURLOPT_COOKIE, $cookie); 
                curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
                curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
            }
            $page = curl_exec($ch);
            return($page);
            curl_close($ch);
        }
I hope it works :)

63de44.png


Credits: Modded mraza's codes
 
Last edited:
Delete the cookie files, then try again. If it doesn't work, let me know and I'll post an appropriate download code for Fileserve. You'll have to modify it to make it work with Fileserve, though, because I won't have the time to look through phpUploader.

Delete cookie but don?t work.

this is the code in phpuploader for download from fileserve


PHP:
function fscurl($link, $postfields = '', $cookie = '')
{
    $ch = curl_init($link);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_HEADER, 1);
    curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
    curl_setopt($ch, CURLOPT_REFERER, 'http://www.fileserve.com/');
    curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
    if($postfields)
    {
        curl_setopt($ch, CURLOPT_POST, 1);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
    }
    if($cookie)
    {
        curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
        curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
    }
    $page = curl_exec($ch);
    return($page);
    curl_close($ch);
}

PHP:
function downloadfile($link, $saveto, $fscookie, $hfcookie)
{
    $handle = fopen($saveto, 'w');
    if ($handle)
    {
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $link);
        curl_setopt($ch, CURLOPT_FILE, $handle);
        if ($fscookie)
        {
            curl_setopt($ch, CURLOPT_COOKIEFILE, $fscookie);
        }
        if ($hfcookie)
        {
            curl_setopt($ch, CURLOPT_COOKIEFILE, $hfcookie);
        }
        curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
         curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
        
        curl_exec($ch);
        curl_close($ch);
        fclose($handle);
    }
    else
    {
        echo "<br />Could not download $link. Is your 'files' folder chmodded to 777?";
        exit();
    }
}
 
Your script probably uploads via FTP ;)

Nope, it uploads via web.

I guess this should help!

Upload to FS function:
PHP:
        function upFS($filelocation, $fs_user, $fs_password) {
            $post = array();
            $post["autoLogin"] = true;
            $post["loginUserName"] = $fs_user;
            $post["loginUserPassword"] = $fs_password;
            $post["loginFormSubmit"] = "LOGIN";

            $ch = curl_init();
            curl_setopt($ch, CURLOPT_URL, "http://fileserve.com/login.php");
            curl_setopt($ch, CURLOPT_POST, 1);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_UNRESTRICTED_AUTH, 1);
            curl_setopt($ch, CURLOPT_REFERER, "http://www.fileserve.com/");
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)");
            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
            $result = curl_exec($ch);
            curl_close($ch);
            preg_match("/cookie=[a-zA-Z0-9%]+/i", $result, $matches);
            $doughnut = $matches[0]; //This is the cookie

            $result = postHost("http://www.fileserve.com/", "", $doughnut);
            preg_match('#action="http://upload.fileserve.com/upload/(.*)"#', $result, $matches);
            $rnd = time() . rndNum(3);
            $rnd_id = rndNum(5);
            $server = 'http://upload.fileserve.com/upload/' . $matches[1];
            $page = postHost($server . "?callback=jsonp" . $rnd . "&_=" . $rnd_id, "", $doughnut);

            preg_match('#sessionId\:\'(.*)\'}#', $page, $match);
            $uploadSessionId = $match[1].'/';

            $postfields = array();
            $postfields['file'] = "@$filelocation";
            $page = postHost($server . $uploadSessionId, $postfields, $doughnut);
            preg_match('#"shortenCode":"(.*)"}#', $page, $match);
            $linkId = $match[1];

            if ($match[1])
                $downloadlink = 'http://www.fileserve.com/file/' . $match[1];
            else
                $downloadlink = FALSE;

            return $downloadlink;
        }
Random number generator and Curl functions:

PHP:
 function rndNum($lg) {
            $str = "0123456789";
            for ($i = 1; $i<=$lg; $i++) {
                $st = rand(0, 9);
                $pnt = substr($str, $st, 1);
            }
            return $pnt;
        }

        function postHost($link, $postfields = '', $cookie = '') {
            $ch = curl_init($link);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
            curl_setopt($ch, CURLOPT_HEADER, 1);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
            curl_setopt($ch, CURLOPT_REFERER, 'http://www.fileserve.com/');
            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:'));
            if ($postfields) {
                curl_setopt($ch, CURLOPT_POST, 1);
                curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
            }
            if ($cookie) {
                curl_setopt($ch, CURLOPT_COOKIE, $cookie); 
                curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
                curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
            }
            $page = curl_exec($ch);
            return($page);
            curl_close($ch);
        }
I hope it works :)

63de44.png


Credits: Modded mraza's codes

Awesome work v3g3t4, it obvious will help some people :)
 
Why does the $doughnut variable remind me that I used it in UTL or any of my scripts.. nvm not too sure though :P

and I think I should get a copywrite for the postHost function xD used it in every script I've made with the same capitalization. I smell theft >.>

Nevertheless, nice work V3g3ta

Edit: Now I'm 100% sure
[SLIDE]http://i.imgur.com/CMZsr.jpg[/SLIDE]
 
Last edited:
I have no idea about that doughnut variable! lol

I just changed the function's name to postHost as the actual code had it -_-


And thanks Gunda :)
 
Why does the $doughnut variable remind me that I used it in UTL or any of my scripts.. nvm not too sure though :P

and I think I should get a copywrite for the postHost function xD used it in every script I've made with the same capitalization. I smell theft >.>

Nevertheless, nice work V3g3ta

Edit: Now I'm 100% sure
[SLIDE]http://i.imgur.com/CMZsr.jpg[/SLIDE]


yes i take this from monsterbot

i pay for it but i received only a 100% bugscript after one week lol

i had must mod all the script
 
If u guys would have created & posted this 2 days ago... I would have saved lot of my time <_<
 
Last edited:
@ciaociao: Please refrain from posting the code in public in future. Thank You :)

ok but take care that i pay for a script that not work..i received it only 7 days after the payment !!! with 1000 bug :( omg

upload dont work
all the image dont work...nfo screenshot etc..etc..
category not work
and lot lot of other bug...

then... who sell me the script had see that i encode it for fixit and he broke my server lol
 
ok but take care that i pay for a script that not work..i received it only 7 days after the payment !!! with 1000 bug :( omg

upload dont work
all the image dont work...nfo screenshot etc..etc..
category not work
and lot lot of other bug...

then... who sell me the script had see that i encode it for fixit and he broke my server lol


Encode the files with ioncube?
 
i think is good to pay someone that have spent time for a script...it's a work

i want pay for it but it not work and the owner of the script had think to take the money , not fix the script , and cancel my server...

but i think is not good if i post it here

15 $/m is nothing ....if a script work lol
 
Status
Not open for further replies.
Back
Top