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

Page 1 of 2 12 LastLast
Results 1 to 10 of 13
  1.     
    #1
    Member

    Default How to use Filesonic API for link checking

    Hi guys,
    How to use filesonic api for link checking for HTML site or wordpress.

    This is api link for filesonic
    Code: 
    http://api.filesonic.com/link#FSApi_Link-getInfo
    How to send the link(eg:http://filesonic.com/54785/myfile.zip) and get the file info(file is live or dead) near the file.......??

    i don't know what to do with this above link , i am new to this, but some body please post how to do or link to any tutorial for "How to use API"
    torrfriend Reviewed by torrfriend on . How to use Filesonic API for link checking Hi guys, How to use filesonic api for link checking for HTML site or wordpress. This is api link for filesonic http://api.filesonic.com/link#FSApi_Link-getInfo How to send the link(eg:http://filesonic.com/54785/myfile.zip) and get the file info(file is live or dead) near the file.......?? i don't know what to do with this above link :'(, i am new to this, but some body please post how to do or link to any tutorial for "How to use API" Rating: 5

  2.   Sponsored Links

  3.     
    #2
    Member
    First you gotta get all the links on the page. You can use regex for that.
    Then you have the links like http://www.filesonic.com/file/4053274144

    There's this in the API:
    so you can put the ids with comma or one by one with "ids[]="
    See? You get all the info as XML which you can then turn into an array in PHP, and do whatever you want with it.

  4.     
    #3
    Respected Developer
    Website's:
    wrzc.org
    In the link you gave the id is 54785 so you use that number as shown below

    http://api.filesonic.com/link?method=getInfo&ids=54785


    You'll see it returns

    Code: 
    "links":[{"id":54785,"status":"NOT_AVAILABLE"}]
    which means it's not available or in other words dead.

    To have code that extracts the links from a Wordpress post and then get's the id's from that sends them to FileSonic and gets a return is quiet a bit of coding. Not that hard but will take a while to get rid of the bugs.
    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  5.     
    #4
    Banned
    filesonic will always ban you ip (i cant stand them for this lol), we make bypass to them so you can check unlimited links enjoy it here - http://www.besthostingforums.com/92-development-area/111719-intelligent-url-checker-|-support-94-filehosts.html

  6.     
    #5
    Respected Developer
    Website's:
    wrzc.org
    Quote Originally Posted by devNULL View Post
    filesonic will always ban you ip (i cant stand them for this lol), we make bypass to them so you can check unlimited links enjoy it here - http://www.besthostingforums.com/92-development-area/111719-intelligent-url-checker-|-support-94-filehosts.html
    Your the guy who refused to use their API so what do you expect, of course they'll IP ban you. In this case where he has a Wordpress site where he won't have hundreds of thousands of links to check it will be fine. Also by using the API it's far more accurate and he could even develop it into a link checker that trashes dead links.
    Tutorial How to SEO your Warez Site a guide to help you increase your organic traffic

    Huge list of Warez Sites and free Multiposter Templates

  7.     
    #6
    Member
    Thanks deliteblogger, Mr Happy, devNULL for your explaination.

    1) Extracting id from the link.
    2) Sending id to filesonic in this format
    "http://api.filesonic.com/link?method=getInfo&ids=4053274144"
    3) retrieving the data, it's return as xml

    Code: 
    <FSApi_Link>
    −
    <getInfo>
    −
    <response>
    −
    <links>
    −
    <link>
    <id>2302602951</id>
    <filename>denis_horvat-hey_puzzle-web-2011-ukhx.zip</filename>
    <size>19198510</size>
    <description/>
    <is_password_protected>0</is_password_protected>
    <is_premium_only>0</is_premium_only>
    <updated_on>2011-10-03 17:26:01</updated_on>
    <status>AVAILABLE</status>
    <url>http://www.filesonic.com/file/2302602951</url>
    </link>
    </links>
    </response>
    <status>success</status>
    </getInfo>
    </FSApi_Link>

    4) Now using simple XML to extract text from XML

    Code: 
    http://www.w3schools.com/PHP/php_xml_simplexml.asp
    5)Integrating in wordpress/Html site.
    Now coming to point, how to extract id from whole filesonic link...? i am struck in 1st point itself



  8.     
    #7
    Member
    PHP Code: 
    $subject 'blah blah 123 string http://www.filesonic.com/file/4053274144 blah blah...';
    preg_match('/filesonic\.com\/file\/([0-9]+)/i',$subject,$matches);
    $id=$matches[1];
    echo 
    $id
    will output:
    4053274144
    (edited)

  9.     
    #8
    Member
    PHP Code: 
    $subject 'http://www.filesonic.com/file/4053274144';
    preg_match('/filesonic\.com\/file\/([0-9]+)/i',$subject,$matches);
    $id=$matches[1];
    echo 
    $id
    above code returns the id correctly(thanks deliteblogger).
    Then i added the below code to fetch xml from filesonic api(http://api.filesonic.com/link?method=getInfo&ids=$id).
    but it doesn't show anything.

    PHP Code: 
    $url 'http://api.filesonic.com/link?method=getInfo&ids=$id';
    $str file_get_contents($url);

    function 
    get_url_contents($url){
            
    $crl curl_init();
            
    curl_setopt ($crlCURLOPT_URL,$url);
            
    curl_setopt($crlCURLOPT_HEADER0);
            
    curl_setopt ($crlCURLOPT_RETURNTRANSFER1);
            
    $ret curl_exec($crl);
            
    curl_close($crl);
            return 
    $ret;

    I dont need all the content from api's xml page, need only the Status wheather the file is alive or dead.

    I want Result like below:

    Code: 
    http://www.filesonic.com/file/4053274144  Available
    http://www.filesonic.com/file/4436274165  Not Available

  10.     
    #9
    Member
    PHP Code: 
    $url 'http://api.filesonic.com/link?method=getInfo&ids=$id'
    should be
    PHP Code: 
    $url "http://api.filesonic.com/link?method=getInfo&ids=$id"
    or
    PHP Code: 
    $url 'http://api.filesonic.com/link?method=getInfo&ids='.$id
    but you could have figured that out if you just echoed $url. use your logic when trying to write codes

    http://php.net/manual/en/language.types.string.php

  11.     
    #10
    It begins...
    It doesn't get any simpler than this:
    PHP Code: 
    <?php

    $link 
    $_GET['url']; //change this to POST based if you want to.
    $id explode("/"$link);
    $id trim($id[4]);

    $url "http://api.filesonic.com/link?method=getInfo&ids=$id&format=json";

    $page file_get_contents($url);
    $page json_decode($pageTRUE);
    $status trim($page['FSApi_Link']['getInfo']['response']['links']['0']['status']);
    echo 
    $link " --- " $status;

    ?>

    Output Screen:


    EDIT: Right click and view the above image in a new window to see the full size.

Page 1 of 2 12 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Filesonic Single Link vs Splitted Link
    By piratebay in forum File Host Discussion
    Replies: 4
    Last Post: 14th Apr 2011, 04:53 AM
  2. Link Checking Bot Required
    By orbofdarkness in forum vBulletin
    Replies: 8
    Last Post: 4th Jan 2011, 05:49 PM
  3. pbpBB3 Link Checking Bot
    By CyberKing321 in forum phpBB
    Replies: 7
    Last Post: 15th Aug 2010, 08:26 PM
  4. New link checking site similiar to tubenow
    By boris in forum Webmaster Discussion
    Replies: 0
    Last Post: 6th Oct 2009, 12:51 AM
  5. Replies: 14
    Last Post: 24th Oct 2008, 09:41 AM

Tags for this Thread

BE SOCIAL