Log in
Sign up
Language ⇓
Menu ⇓
English
Deutsch
Affiliate-Program
Premium
Terms of Service
Help
Support & Contact
About Us
Tools & API's
Imprint
Tools & API's

Link-Checker
Here follows the API description. To check links and its files for their online-state click here: Link-Checker

Description
With MegaFile's "Link-Checker - API" the user gets an easy and comfortable way to represent the current online-state of a file in a forum, a blog or at the users own website. The API can handle a couple of parameters in order for the user to adjust the appearance of the response.

Usage of the API
MegaFile's API usually gets called directly from within the browser either as AJAX-Request or direct call or by being embedded via HTML-Code from a website or via BB-code embedded in a forum. The basic structure of the API does look like this:

https://megafile.biz/API/link_checker/"Link to File"/

"Link to File" has to get replaced with the unique link to the file. You can also let these links get generated from within the Filemanager, this will be alot easier and more comfortable for some users.

Does this link gets called in the browser just like this, there will be shown a simple graphic which represents the online-state of the requested file.

= File is online
= File is offline

When you do use the basic structure a PNG-graphic will get replied, this graphic can get embedded via HTML-Code on the users desired website:

<img src="https://megafile.biz/API/link_checker/"Link to File"/">

A forum, most likely, will allow the user to use BB-code rather than HTML-code, so here is a sample for the BB-code:

[IMG]https://megafile.biz/API/link_checker/"Link to File"/[/IMG]

In order to adjust the output of the response, our API needs a couple defined parameters. These parameters are getting to use as followed:

https://megafile.biz/API/link_checker/"Link to File"/?parameter=value

When using multiple parameters, they have to get split apart as followed:

https://megafile.biz/API/link_checker/"Link to File"/?parameter=value&parameter=value

Now following the meaning and values of the defined parameters gets listed:

Parameter Value Explanation
size 25, 100 Size of the graphic that shall be replied. The default value is 25, the lowest value is 10 and the highest value is 150 pixel.
background #FFFFFF Specification of the background color given as color-code. In case this parameter is not given or not valid the reply will be set to the default value, transparent.
text - The parameter "text" does not need a value. Is this parameter given, the output reply will be the online-state in form of text withing the graphic
--- More parameter will be following ---

Usage Guidelines of the API
The API can be used by anyone for free. All parameter the user can define has to be given correct and as expected. In case some given values are not correct the parameter will get thrown away and the default value will get used. In case of any massively requesting of wrong or suspicious looking parameters the account of the requesting user might get blocked from requesting further API-calls!
 
Embedded Downloads
Here follows the API to embed file downloads on other sites, to check links now click here: Link-checker

Description
With MegaFile's "Embedded downloads - API" the user is allowed to comfortly embed MegaFile's download page directly within a forum post, within an entry of his blog or on his website. Also take a note that there will no advertisements being shown on it!

Usage of the API
MegaFile's API usually gets embedded via HTML-code or BB-code. To be able to call our API from the site, the code has to be embedded within it. The basic structure of the API looks like this:

https://megafile.biz/file/"Link to File"/embed/

"Link to File" has to get replaced with the unique link to the file. You can also let these links get generated from within the filemanager, this will be alot easier and more comfortable for some users.

Embedding with HTML-code
Now this link has to get embedded within the page, with HTML this would look like this:

<iframe src="https://megafile.biz/file/"Link to File"/embed/Parameter1/"
   width  = "Parameter2"
   height = "Parameter3"
   border = "Parameter4"
></iframe>

Instead of HTML-attributes you can also use CSS for styling, this would be look like this then:

<iframe src="https://megafile.biz/file/"Link to File"/embed/Parameter1/"
   style="
      width:  Parameter2px;
      height: Parameter3px;
      border: Parameter4px solid #000000;
   "></iframe>

The data needed to display the page via iFrame can be changed as desired. In order to display the site at best we suggest a minimum width of 800 and a minimum height of 500 pixel.

Embedding with BB-code
The BB-code for the iFrame has to look like this:

[iframe=https://megafile.biz/file/"Link to File"/embed/Parameter1/]
   Parameter2,Parameter3,Parameter4
[/iframe]
Since the iFrame-code is susceptible/tricky for some provider of forums, it can be the case that the iFrame code will be disabled in your forum!

Now following the meaning and values of the defined parameters gets listed:

Parameter Value Explanation
Parameter1 en, de Specification of the langueage that shall be used, as example "en" for english or "de" for german. In case the requested language does not exists, the default language will get used, which is "de"
Parameter2 800 Width of the iFrame, value has to be given in pixel
Parameter3 500 Height of the iFrame, value has to be given in pixel
Parameter4 1 Border (iFrame frame/border), value has to be given in pixel

Usage Guidelines of the API
The API can be used by anyone for free. All parameter the user can define has to be given correct and as expected. In case some given values are not correct the parameter will get thrown away and the default value will get used. In case of any massively requesting of wrong or suspicious looking parameters the account of the requesting user might get blocked from requesting further API-calls!