phpUploader?

Status
Not open for further replies.
12 comments
thanks.
can you show me a link where this rule is written? what does 'hosted script' exactly mean?

Buyer: Hi, I need a upload script.
Seller: I can do it.
Mod: OMGWTF, YOU MAD, NOT ALLOWED

Buyer: I want upload script (+vps)
sBorg, RL owner: Sure, I have just the right thing for you.
Ndoy: Welcome to WJ, Enjoy your Stay
Buyer: Thanks, transaction completed.
 
Buyer: Hi, I need a upload script.
Seller: I can do it.
Mod: OMGWTF, YOU MAD, NOT ALLOWED

Buyer: I want upload script (+vps)
sBorg, RL owner: Sure, I have just the right thing for you.
Ndoy: Welcome to WJ, Enjoy your Stay
Buyer: Thanks, transaction completed.

EPIC WIN mate
 
^^
I wouldn't say that.
coz if I say, I want to resume development on phpuploader, would you open the thread ?

They were closed for that reason. But the reason they are closed now is because Upload Scripts aren't allowed now.
 
I am currently working on the script. I know it will never be as good as most scripts out there but i have pulled stuff from other parts and going to make it a script for myself and myself only :)
 
@ajinkiya
Sales of such scripts are not allowed. Developing those scripts and giving them out to the community, as an opensource project, is perfectly fine.

I hope you did realize that I coded phpUploader, and back then I reported it to be closed because I've stopped development since. You could open a new thread if you plan on resuming development, for free. But getting the original thread re-opened is not possible, because you're not its OP :)
 
I cant seem to sort the full fileserve and also create a wupload one to work aswell, i will keep trying but they are the only problems i am encountering.
 
I cant seem to sort the full fileserve and also create a wupload one to work aswell, i will keep trying but they are the only problems i am encountering.
Better check the post by v3g3ta in your thread:

To use it with phpuploader:

Open includes/functions.php

Replace existing "fscurl" function with:

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_COOKIE, $cookie); 
            curl_setopt($ch, CURLOPT_COOKIEJAR, $cookie);
            curl_setopt($ch, CURLOPT_COOKIEFILE, $cookie);
        }
        $page = curl_exec($ch);
        return($page);
        curl_close($ch);
}
Add this function somewhere in the file:

PHP:
 function rndNum($lg) {
            $str = "0123456789";
            for ($i = 1; $i<=$lg; $i++) {
                $st = rand(0, 9);
                $pnt = substr($str, $st, 1);
            }
            return $pnt;
        }
</span></span>And replace "uploadtofs" with this:
PHP:
function uploadtofs($filelocation, $ufsuser, $ufspass)
{
     $post = array();
     $post["autoLogin"] = true;
     $post["loginUserName"] = $ufsuser;
     $post["loginUserPassword"] = $ufspass;
     $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 = fscurl("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 = fscurl($server . "?callback=jsonp" . $rnd . "&_=" . $rnd_id, "", $doughnut);

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

     $postfields = array();
     $postfields['file'] = "@$filelocation";
     $page = fscurl($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;
}
All from the post linked above but spoon-feeded :|

Edit: You need to update the function "uploadtofs" in plugins/uploadhosts.php
1. Filelocation - leave it as it was
2. Username = usually $ufsuser
3. Password = usually $ufspass

636a15d7.png

It works!
 
Last edited:
Status
Not open for further replies.
Back
Top