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

Page 5 of 8 FirstFirst ... 34567 ... LastLast
Results 41 to 50 of 72
  1.     
    #41
    Member
    Quote Originally Posted by gunda316 View Post
    The function is for uploading
    I know that, I'm trying to make one for downloading, could you give a help?

    Follow the code for filesonic:
    Code: 
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://www.filesonic.com/user/login");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "email=xxxxxxxxx&redirect=%2F&password=xxxxxxxx&rememberMe=1");
    $output = curl_exec($ch);
    curl_close($ch);
    echo $output;
    The problem is not logging in. Any idea?

  2.     
    #42
    Member
    Thanks for the share gunda this is a very good learning experience!

    If anyone has insight on how to measure file upload progress, can they explain in post or via PM. Thanks!

  3.     
    #43
    You can call me G
    Quote Originally Posted by ricardodinucci View Post
    I know that, I'm trying to make one for downloading, could you give a help?

    Follow the code for filesonic:
    Code: 
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, "http://www.filesonic.com/user/login");
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, "email=xxxxxxxxx&redirect=%2F&password=xxxxxxxx&rememberMe=1");
    $output = curl_exec($ch);
    curl_close($ch);
    echo $output;
    The problem is not logging in. Any idea?
    Hint: Store the cookie



    My Langotiya Yaars (Chaddi buddies): JmZ, humour, Chutad, Esotorisk, l0calhost, Daniel, Mind Freak?, TLK, Amz

  4.     
    #44
    It begins...
    Hint: Use the API -> http://api.filesonic.com/doc

  5.   Sponsored Links

  6.     
    #45
    Member
    I'm not familiar with cookie, can you make a code example for me?

    Code: 
    p=md5(md5(password)email)
    
    PHP exemple:
         $clearTextPassword = '1234';
         $email = 'a@b.c';
    
         $encryptedPassword = md5(md5($clearTextPassword) . $email);
    And yes they show the code, but how I send those variables to File Sonic to I get back the XML file?

  7.     
    #46
    Member
    Website's:
    PasteBot.appspot.com
    Are you a Premium member ?
    If NO, then the API is of no use to you.

    If you're not a Premium member, then there is no need to login to your account.
    I think if you do something like this:
    Code: 
    opener.open("http://www.google.com/recaptcha/api/challenge?k=6LdNWbsSAAAAAIMksu-X7f5VgYy8bZiiJzlP83Rl&ajax=1&cachestop="+str(random.random()))
    random.random() is a random no., between 0 & 1
    You'll get the captcha Image.

  8.     
    #47
    Member
    I'm premium.

  9.     
    #48
    It begins...
    Use this URL format (replace the obvious vars) to get an xml response:
    Code: 
    http://api.filesonic.com/link?method=getDownloadLink&u=EMAIL&p=PASSWORD&ids=FILESONICID&format=xml
    Replace 'format=xml' with 'format=json' to get a response in json.

    Then, just use php's json_decode function to decode the response and extract the links using the appropriate array hierarchy.

  10.     
    #49
    Member
    Quote Originally Posted by Lifetalk View Post
    Use this URL format (replace the obvious vars) to get an xml response:
    Code: 
    http://api.filesonic.com/link?method=getDownloadLink&u=EMAIL&p=PASSWORD&ids=FILESONICID&format=xml
    Replace 'format=xml' with 'format=json' to get a response in json.

    Then, just use php's json_decode function to decode the response and extract the links using the appropriate array hierarchy.
    Yea that seems to be the easiest solution for ricardo.

    Do you know of a way to report the current upload or download speed of curl through php? I'd rather use curl for downloading and uploading, but with no progress I'd have to use the example from RL of sending chunks through a socket?

  11.     
    #50
    Member
    Website's:
    PasteBot.appspot.com
    I don't know how it's done in PHP, but
    in Python, there's a function called urllib.urlretrieve()
    It takes an argument called reporthook, which takes a hook function.
    this hook function takes three arguments
    count of blocks, the size of the block, total size of all the blocks(filesize)
    in bytes.
    Source: docs
    It's tailored to do what you need.


    EDIT: Please dont highjack this thread. Instead make a new thread, for your queries.

    EDIT_AGAIN: Maybe you can use a subprocess, to download the file in python, and do the rest with PHP.

Page 5 of 8 FirstFirst ... 34567 ... LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [help] Uploading images to imageporter with curl
    By hover in forum Web Development Area
    Replies: 3
    Last Post: 23rd Apr 2011, 10:23 PM
  2. Help with Uploading.com batch Link Checker and Curl ..
    By Lock Down in forum Webmaster Resources
    Replies: 9
    Last Post: 3rd Dec 2010, 02:31 AM
  3. [linux] Uploading to FileServe via curl
    By Snell in forum Tutorials and Guides
    Replies: 0
    Last Post: 19th Jun 2010, 12:52 PM
  4. [guide] Uploading to Hofile using curl
    By desiboy in forum Tutorials and Guides
    Replies: 19
    Last Post: 30th May 2010, 07:40 PM

Tags for this Thread

BE SOCIAL