Activity Stream
48,167 MEMBERS
61007 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Results 1 to 5 of 5
  1.     
    #1
    Member

    Default [Help] PHP Curl Lumfile.com Problem

    Hi people! I Try upload files to this hosting, and get download link, but file does not appear in my files in my account.

    this is my code:

    PHP Code: 
    function lumfile($user$pass$file) { 

            
    $login curl_init(); 
            
    curl_setopt_array($login, array( 
                
    CURLOPT_URL => 'http://lumfile.com/'
                
    CURLOPT_RETURNTRANSFER => true
                
    CURLOPT_COOKIEJAR => 'lumfile.cookie'
                
    CURLOPT_POST => true
                
    CURLOPT_POSTFIELDS => "op=login&redirect=http%3A%2F%2Flumfile.com%2F&login=$user&password=$pass
            
    )); 
            
    curl_exec($login); 
            
    curl_close($login); 

            
    $server curl_init(); 
            
    curl_setopt_array($server, array( 
                
    CURLOPT_URL => 'http://lumfile.com/'
                
    CURLOPT_RETURNTRANSFER => true
                
    CURLOPT_COOKIEFILE => 'lumfile.cookie' 
            
    )); 
            
    $result curl_exec($server); 
            
    curl_close($server); 
         
            
    preg_match('/action="(.*?)"/i'$result$match); 
            
    preg_match_all('/value="(.*?)"/i'$result$out); 
            
    $srv $match[1]; 
            
    $id $out[1][3]; 
            
    $tmp $out[1][4]; 
         
            
    $uid ''
            
    $i 0
            while(
    $i 12) { 
                
    $uid .= rand(0,9); 
                
    $i++; 
            } 
             
            
    $up_url $srv $uid '&js_on=1&utype=reg&upload_type=file'
            
    $url $up_url
             
            
    $upload curl_init(); 
            
    curl_setopt_array($upload, array( 
                
    CURLOPT_URL => $url
                
    CURLOPT_REFERER => 'http://lumfile.com/'
                
    CURLOPT_RETURNTRANSFER => true
                
    CURLOPT_COOKIEFILE => 'lumfile.cookie'
                
    CURLOPT_POST => true
                
    CURLOPT_POSTFIELDS => array( 
                    
    'upload_type' => 'file'
                    
    'sess_id' => $id
                    
    'srv_tmp_url' => $tmp
                    
    'link_rcpt' => ''
                    
    'link_pass' => ''
                    
    'file_0' => "@$file"
                    
    'tos' => '1'
                    
    'submit_btn' => 'Upload! ' 
                

            )); 
            
    $result curl_exec($upload); 
            
    curl_close($upload); 

            
    preg_match("/name='fn'>(.*?)</i"$result$dl); 
            
    $fn $dl[1]; 

            
    $getlink curl_init(); 
            
    curl_setopt_array($getlink, array( 
                
    CURLOPT_URL => 'http://lumfile.com/'
                
    CURLOPT_RETURNTRANSFER => true
                
    CURLOPT_COOKIEFILE => 'lumfile.cookie'
                
    CURLOPT_POST => true
                
    CURLOPT_POSTFIELDS => "fn=$fn&st=OK&op=upload_result" 
            
    )); 
            
    $res curl_exec($getlink); 
            
    curl_close($getlink); 

            
    preg_match('@(https?://(?:www\.)?lumfile\.com/\w+(?:/[^\?|/|<|>|\"|\'|\r|\n]+)?(?:\.html)?)\?killcode=\w+@i'$res$match); 

            return 
    $match[1]; 

        } 
    Please help me !
    heppinnz Reviewed by heppinnz on . [Help] PHP Curl Lumfile.com Problem Hi people! I Try upload files to this hosting, and get download link, but file does not appear in my files in my account. this is my code: function lumfile($user, $pass, $file) { $login = curl_init(); curl_setopt_array($login, array( CURLOPT_URL => 'http://lumfile.com/', CURLOPT_RETURNTRANSFER => true, Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    sborg.us
    I guess it's the issue from the filehost's end.

    Tried uploading a small file (around thrice) and I wasn't redirected to the download link page at all!

    V3g3ta | Halcyon | Abhi

  4.     
    #3
    Member
    I guess it's the issue from the filehost's end.

    Tried uploading a small file (around thrice) and I wasn't redirected to the download link page at all!
    Thank you for trying...

    Very strange, a link to download the file I get, but the files in my account is not

  5.     
    #4
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    Try this
    PHP Code: 
    <?
    $debug 
    true;
    $img dirname(__FILE__).'/0001.jpg';

    $link upload_lumfile('0001.jpg'$img'user''pass');

    echo 
    '<br /><br /><b>Download link: </b>'.$link;

    function 
    upload_lumfile($filename$file$username$password) {
        global 
    $debug;
        
    $cookie =  dirname(__FILE__).'/upload_hosts_lumfile.txt';
        
    lumfile_login($username,$password,$cookie);
        
    $d lumfileupload($filename,$file,$cookie,$username$password);
        if(
    preg_match('~http://lumfile\.com/(.*?)$~i',$d)) return $d;
        else return 
    '';
    }
    function 
    lumfile_login($user,$pass,$cookie){
        global 
    $debug;
        
    $ref "http://lumfile.com/login.html";
        
    $url "http://lumfile.com/";
        
    $post = array();
        
    $post['op'] = 'login';
        
    $post['redirect'] = 'http://lumfile.com/';
        
    $post['login'] = $user;
        
    $post['password'] = $pass;
        
    $strpage curl_func($url,$post,$cookie,$ref);
        if(
    $debug) echo '<br /><textarea>'.htmlentities($strpage).'</textarea>';echo '<br />';
    }    


    function 
    lumfileupload($filename,$filelocation,$cookie,$username$password){ 
        global 
    $debug;
        
    $download_link '';   
        
    $ref "http://lumfile.com/";
        
    $url 'http://lumfile.com/';
        
    $page curl_func($url,'',$cookie,$ref);
           if(
    $debug) echo '<br /><textarea>'.htmlentities($page).'</textarea>';

        
    $post = array();
        
    $post["upload_type"] = 'file';
        
    $post["sess_id"] = cut_str($page'name="sess_id" value="','"');
        
    $post["srv_tmp_url"] = cut_str($page'name="srv_tmp_url" value="','"');
        
    $post['file_0; filename="'.$filename.'"'] = "@".$filelocation;
        
        
    $server cut_str($page'<form name="file" enctype="multipart/form-data" action="','"');
        if(
    $debug) echo '<br />'.$server;
        if(
    $debug) { echo '<br />'print_r($post); }
        
    $page curl_func($server,$post,$cookie,$ref);
           if(
    $debug) echo '<br /><textarea>'.htmlentities($page).'</textarea>';
        if(
    preg_match('~<textarea id="ic0-\d+" style="width:98%;" rows=3 onFocus="copy\(this\);">http://lumfile.com/(.*?)</textarea>~ism',$page,$matches)) {
            if(
    $debug) { echo '<br />'print_r($matches);echo '<br />'; }
            
    $download_link 'http://lumfile.com/'.$matches[1];
            return 
    $download_link;
        }
        else return 
    false;
    }

    function 
    cut_str($a,$b,$c){$a=substr(stristr($a,$b),strlen($b));$d=strlen(stristr($a,$c));$d=$d ? - ($d) : strlen($a);$a=substr($a,0,$d);return $a;} 
    function 
    curl_func($link$postfields ''$cookie ''$refer ''$header 1$follow 1$usragent ''){

        
    $ch curl_init($link);
        
    curl_setopt($chCURLOPT_RETURNTRANSFER1);
        if(
    $header)
            
    curl_setopt($chCURLOPT_HEADER1);
        else
            
    curl_setopt($chCURLOPT_HEADER0);         
        if(
    $follow)
            
    curl_setopt($chCURLOPT_FOLLOWLOCATION1);
        else
            
    curl_setopt($chCURLOPT_FOLLOWLOCATION0); 
        if(
    $usragent)    
           
    curl_setopt($chCURLOPT_USERAGENT$usragent);
        else
            
    curl_setopt($chCURLOPT_USERAGENT'Mozilla/5.0 (Windows NT 6.1; rv:8.0) Gecko/20100101 Firefox/8.0');
        
        if(
    $refer)
            
    curl_setopt($chCURLOPT_REFERER$refer);
            
        if(
    $postfields){
            
    curl_setopt($chCURLOPT_POST1);
            
    curl_setopt($chCURLOPT_POSTFIELDS$postfields);
        }
        if(
    $cookie){
            
    curl_setopt($chCURLOPT_COOKIEJAR$cookie);
            
    curl_setopt($chCURLOPT_COOKIEFILE$cookie);
        }

        
    $page curl_exec($ch);
        
    curl_close($ch);
        return 
    $page;
    }
    ?>
    Tested:



  6.     
    #5
    Member
    t3od0r: Thank you very much!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 30th Oct 2012, 05:53 AM
  2. Replies: 3
    Last Post: 4th Jul 2012, 08:28 AM
  3. Replies: 656
    Last Post: 24th Jun 2012, 03:03 AM
  4. cURL or PHP Problem.
    By deelow66 in forum Technical and Security Tutorials
    Replies: 4
    Last Post: 2nd May 2010, 01:57 AM

Tags for this Thread

BE SOCIAL