Activity Stream
48,167 MEMBERS
6886 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 why it give me error ? filesonic API download

    Thanks for soft2050 for this code

    <?php // Download Filesonic Link - Start (Coded By Soft2050)

    $username='';
    $password='';
    $link='http://www.filesonic.com/file/2741198321/D1R3CT0Rs_kT_C1ty_C0urty4rd.rar';

    function dlfsolink($link, $username, $password) {
    $getidoflink = str_replace('/', '-', get_match('|/file/(([a-z][0-9]+/)?[0-9]+)(/.*)?$|', $link, 1));
    $getresult = file_get_contents("http://api.filesonic.com/link?method=getDownloadLink&u=$username&p=$passwor d&ids=$getidoflink&format=xml");
    preg_match('/\<url\>(.*?)\<\/url\>/i', $getresult, $matches);
    $link = trim($matches[0]);
    return $link;
    }
    // Download Filesonic Link - Stop

    echo dlfsolink($link,$username, $password);

    ?>

    now it give me error

    Fatal error: Call to undefined function get_match() in /home/****/public_html/ajax/ddl.php on line 5

    please can any expert tell me what is the problem ?
    hihotfile Reviewed by hihotfile on . why it give me error ? filesonic API download Thanks for soft2050 for this code <?php // Download Filesonic Link - Start (Coded By Soft2050) $username=''; $password=''; $link='http://www.filesonic.com/file/2741198321/D1R3CT0Rs_kT_C1ty_C0urty4rd.rar'; function dlfsolink($link, $username, $password) { $getidoflink = str_replace('/', '-', get_match('|/file/((+/)?+)(/.*)?$|', $link, 1)); Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    function get_match() is missing

    read the post where you found the code and find that function

  4.     
    #3
    Respected Member
    Website's:
    DL4Everything.com Soft2050.in
    Ahh! The code which i pmed you , i forget to send the json function that i use

    Add this function in the php file and it will work:

    PHP Code: 
    function get_match($regex,$content$matchat) {
      
    preg_match($regex,$content,$matches);
      return 
    $matches[$matchat];

    Just made that to shorten up teh code

  5.     
    #4
    It begins...
    WHOAAAAAAAAAAAAAAAAAAA! That is some really fucked up code. Use this instead:
    PHP Code: 
    <?php

    $username 
    "";
    $password "";
    $link "";

    //STOP, U NO EDIT BELOW!
    $link trim($link);
    $id explode('/'$link);
    $id trim($id[4]);

    $page file_get_contents("http://api.filesonic.com/link?method=getDownloadLink&u=$username&p=$password&ids=$id&format=json");
    $page json_decode($pageTRUE);

    $finallink trim($page['FSApi_Link']['getDownloadLink']['response']['links'][$id]['url']);

    echo 
    $finallink;

    //PROFIT!
    ?>

  6.     
    #5
    Member
    First of all thanks soft2050 for he PM me download code

    now thanks for Lifetalk i am using your code
    ---------------------------------------------------------
    i add download code but its sucks :
    Request Timeout

    This request takes too long to process, it is timed out by the server. If it should not be timed out, please contact administrator of this web site to increase 'Connection Timeout'.

    ----------------------------------------------------------------------------------------------------------------------------
    $remote=$finallink;
    $local='/home/********/public_html/ajax/test.zip';
    function curl_download($remote, $local) {
    $cp = curl_init($remote);
    $fp = fopen($local, "w");

    curl_setopt($cp, CURLOPT_FILE, $fp);
    curl_setopt($cp, CURLOPT_HEADER, 0);

    curl_exec($cp);
    curl_close($cp);
    fclose($fp);
    }

    curl_download($remote, $local);

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Filesonic Mega News - Everybody Must Read Now + 50 Free Premium Give Aways Here!
    By FileSonic Hish in forum File Hosts Official Support
    Replies: 355
    Last Post: 14th Jan 2012, 12:15 PM
  2. Anyone else get this error Filesonic
    By YoungMike in forum File Host Discussion
    Replies: 10
    Last Post: 14th Oct 2011, 10:38 AM
  3. Plz Give Solution for this Error
    By Mr.WT in forum vBulletin
    Replies: 11
    Last Post: 3rd May 2011, 02:05 PM
  4. Please give me plugin for RL "filesonic premium download plugin"
    By ThumperTM in forum General Discussion
    Replies: 7
    Last Post: 7th Apr 2011, 06:27 AM

Tags for this Thread

BE SOCIAL