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

Results 1 to 10 of 10
  1.     
    #1
    Member
    Website's:
    satiq.net

    Default Upload to Share-online with cUrl

    Hi,

    I'm trying to upload to share-online with php and this is the simple code I use:

    PHP Code: 
    $linkSO "http://".$SessionName21[1]."/upv3.php";
                   
    $postfieldsSO = array('username' => 'user''password' => 'pass''upload_session' => $SessionName21[0], 'chunk_no' => '1''chunk_number' => '1''filesize' => $sizeFileUPLOAD'fn' => '@'.$source_file'finalize' => '1'); 
                
                
                
    $ch curl_init();
    curl_setopt($chCURLOPT_URL$linkSO);
    curl_setopt($chCURLOPT_POST1);
    curl_setopt($chCURLOPT_POSTFIELDS$postfieldsSO);
    curl_setopt($chCURLOPT_RETURNTRANSFERTRUE);
    $postResultSO curl_exec ($ch);
    curl_close ($ch); 
    but it says : no input file;

    What I do wrong?

    Thanks
    skinner Reviewed by skinner on . Upload to Share-online with cUrl Hi, I'm trying to upload to share-online with php and this is the simple code I use: $linkSO = "http://".$SessionName21."/upv3.php"; $postfieldsSO = array('username' => 'user', 'password' => 'pass', 'upload_session' => $SessionName21, 'chunk_no' => '1', 'chunk_number' => '1', 'filesize' => $sizeFileUPLOAD, 'fn' => '@'.$source_file, 'finalize' => '1'); $ch = curl_init(); Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    dont know but did you not need the Api for that?!

    http://www.share-online.biz/uploadapi/

    maybe this help you?!

  4.     
    #3
    Member
    Website's:
    satiq.net
    Quote Originally Posted by Deadmau5 View Post
    dont know but did you not need the Api for that?!

    http://www.share-online.biz/uploadapi/

    maybe this help you?!
    Yeah I read, but it says only User and Password.. with them I get upload session..

  5.     
    #4
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    PHP Code: 
    '@'.$source_file 
    Make sure you are linking to full path. You can use realpath() to get full path

  6.     
    #5
    Member
    Website's:
    satiq.net
    Quote Originally Posted by soft2050 View Post
    PHP Code: 
    '@'.$source_file 
    Make sure you are linking to full path. You can use realpath() to get full path
    I try with '@'.$source_file and '@'.realpath($source_file) but always says No input file specified.

  7.     
    #6
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    try this
    PHP Code: 
    function shareonlinebiz_getsession($user,$pass){

        
    $url "http://www.share-online.biz/upv3_session.php";
        
    $postdata = array();
        
    $postdata['username'] = $user;
        
    $postdata['password'] = $pass;
        
    $strpage curl_func($url,$postdata,'','',0);
        return 
    $strpage;
    }    


    function 
    shareonlinebizupload($filename,$filelocation,$username$password){    
        
    $data shareonlinebiz_getsession($username,$password);
        
    $data explode(';',$data);
        
    $fpost = array();
        
    $fpost["username"] = $username;
        
    $fpost["password"] = $password;
        
    $fpost["upload_session"] = $data[0];
        
    $fpost['chunk_no'] = '1';
        
    $fpost['chunk_number'] = '1';
        
    $fpost['filesize'] = filesize($filelocation);
        
    $fpost['fn'] = "@".$filelocation;
        
    $fpost["finalize"] = "1";    
        
        
    //printr($fpost);
        
    $server 'http://'.$data[1];
        
    //echo $server;
        
    $page curl_func($server,$fpost,'','',0);
        echo 
    $page;
        
    $data explode(';',$page);
        
    $download_link=$data[0];
        return 
    $download_link;


  8.     
    #7
    Member
    Website's:
    satiq.net
    Quote Originally Posted by t3od0r View Post
    try this
    PHP Code: 
    function shareonlinebiz_getsession($user,$pass){

        
    $url "http://www.share-online.biz/upv3_session.php";
        
    $postdata = array();
        
    $postdata['username'] = $user;
        
    $postdata['password'] = $pass;
        
    $strpage curl_func($url,$postdata,'','',0);
        return 
    $strpage;
    }    


    function 
    shareonlinebizupload($filename,$filelocation,$username$password){    
        
    $data shareonlinebiz_getsession($username,$password);
        
    $data explode(';',$data);
        
    $fpost = array();
        
    $fpost["username"] = $username;
        
    $fpost["password"] = $password;
        
    $fpost["upload_session"] = $data[0];
        
    $fpost['chunk_no'] = '1';
        
    $fpost['chunk_number'] = '1';
        
    $fpost['filesize'] = filesize($filelocation);
        
    $fpost['fn'] = "@".$filelocation;
        
    $fpost["finalize"] = "1";    
        
        
    //printr($fpost);
        
    $server 'http://'.$data[1];
        
    //echo $server;
        
    $page curl_func($server,$fpost,'','',0);
        echo 
    $page;
        
    $data explode(';',$page);
        
    $download_link=$data[0];
        return 
    $download_link;

    It could work, but I need your curl_func, Thanks

  9.     
    #8
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    PHP Code: 
    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; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
        
        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);
        }
        
    curl_setopt($chCURLOPT_HTTPHEADER, array('Expect:'));
        
    $page curl_exec($ch);

        
    curl_close($ch);

        if(empty(
    $page)){
            echo 
    "<br/>Could not connect to host: <br/> $link <br/>";
            
    //die();
        
    }
        else{
            return 
    $page;
        }


  10.     
    #9
    Member
    Website's:
    satiq.net
    It says:

    Could not connect to host:
    http://


    EDIT: I've resolve making only one function from your two..

  11.     
    #10
    Member
    Website's:
    tv-release.net
    This for you - Tested By me and work good

    PHP Code: 
    <?php
    /*
    Upload to Share-online with cUrl
    Fixed By: AdelSBM
    */


    //----------------------------------
    $user="0123456789";  // Username
    $pass="HgHFGhFsfS";    // Password

    $filelocation="999.rar";  // file Path
    //-----------------------------------

    shareonlinebizupload($filename,$filelocation,$user$pass); // Let's upload


    function shareonlinebiz_getsession($user,$pass){

        
    $url "http://www.share-online.biz/upv3_session.php";
        
    $postdata = array();
        
    $postdata['username'] = $user;
        
    $postdata['password'] = $pass;
        
    $strpage curl_func($url,$postdata,'','',0);
        return 
    $strpage;
    }    


    function 
    shareonlinebizupload($filename,$filelocation,$user$pass){    
        
    $data shareonlinebiz_getsession($user,$pass);
        
    $data explode(';',$data);
        
    $fpost = array();
        
    $fpost["username"] = $user;
        
    $fpost["password"] = $pass;
        
    $fpost["upload_session"] = $data[0];
        
    $fpost['chunk_no'] = '1';
        
    $fpost['chunk_number'] = '1';
        
    $fpost['filesize'] = filesize($filelocation);
        
    $fpost['fn'] = "@".$filelocation;
        
    $fpost["finalize"] = "1";    
        
        
    //printr($fpost);
        
    $server 'http://'.$data[1];
        
    //echo $server;
        
    $page curl_func($server,$fpost,'','',0);
        
    $data explode(';',$page);
        
    $download_link=$data[0];
        echo 
    $download_link;
    }  
    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; U; Windows NT 5.1; en-US; rv:1.8.1.1) Gecko/20061204 Firefox/2.0.0.1');
        
        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);
        }
        
    curl_setopt($chCURLOPT_HTTPHEADER, array('Expect:'));
        
    $page curl_exec($ch);

        
    curl_close($ch);

        if(empty(
    $page)){
            echo 
    "<br/>Could not connect to host: <br/> $link <br/>";
            
    //die();
        
    }
        else{
            return 
    $page;
        }


    ?>

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [Need help] curl / php upload for mediafire?
    By futureawesome in forum Web Development Area
    Replies: 10
    Last Post: 13th Nov 2012, 12:50 PM
  2. Upload to Share-Online.biz with Perl Script
    By Homosapien in forum Web Development Area
    Replies: 2
    Last Post: 23rd Oct 2012, 04:31 PM
  3. Replies: 358
    Last Post: 9th Oct 2012, 11:46 PM
  4. share-online.biz upload script
    By ciaociao4 in forum Web Development Area
    Replies: 4
    Last Post: 3rd Apr 2012, 04:39 PM
  5. remote upload from easy-share/share.cx to
    By algon in forum File Host Discussion
    Replies: 3
    Last Post: 19th May 2011, 04:09 PM

Tags for this Thread

BE SOCIAL