Developer

Xin vui lòng xem và làm tương tự như hướng dẫn:

Registry một tài khoản trên trang web, trang web đăng nhập

rồi vào settings (cài đặt để nhận key), Link: http://abc.mcatbui.net/user/settings

Nhận API key

 

Tôi nhận được liên kết ngắn của API như là hình thức:

Ex:  http://abc.mcatbui.net/api?api=OA1mCsXthSF&url=http://taiapk.mcatbui.net/danh-muc/tu-vi--boi-toan/17.html&custom=tuvi22

=== >>>    Http://abc.mcatbui.net/tuvi22

Mẫu:  http://abc.mcatbui.net/api?api=YourIPIkey&url=LinkLongOgrinal&custom=namecustomlink

=== >>>    Http://abc.mcatbui.net/tuvi22

Chúc may mắn!!

 

  Tiếng việt: 

 

Xin vui lòng xem and làm tương tự like hướng dẫn:

Đăng kí tài khoản trên one trang web, đăng nhập vào, rồi lấy mã api. link rút gọn nhanh like hướng dẫn

 

Tôi receive liên kết ngắn of API as hình thức:

Ex:   http://abc.mcatbui.net/api?api=OA1mCsXthSF&url=http://taiapk.mcatbui.net/danh-muc/tu-vi--boi-toan/17.html&custom=tuvi22

=== >>>    Http://abc.mcatbui.net/tuvi22

 

Mẫu:   http://abc.mcatbui.net/api?api=YourIPIkey&url=LinkLongOgrinal&custom=namecustomlink

=== >>>    Http://abc.mcatbui.net/tuvi22

Chúc may mắn !!

 

 

\\\

 

\\\

Here I will explain how to use the new API of Premium URL Shortener 2.0. There were some changes to the API in order facilitate requests from developers.

Registering for an API Key

As before, an API key is required for requests to be processed by the system. Link to get API Key: http://abc.mcatbui.net/user/settings . Once a user registers, an API key is automatically generated for this user. The API key must attached to request via the api parameter (see full example below).

Sending a request for shortening a URL

To send a request, the user must use the following format where the variables api and url are required. In the example below, the URL of the demo is used but you should use your own domain name. To request a custom alias, simply add &custom= at the end.

  GET http://abc.mcatbui.net/api?api=APIKEY&url=THELONGURLTOBESHORTENED&custom=CUSTOMALIAS

Server response

As before, the response will encoded in JSON format (default). This is done to facilitate cross-language usage. The first element of the response will always tell if an error has occurred (error: 1) or not (error: 0). The second element will change with respect to the first element. If there is an error, the second element will be named “msg”. which contains the source of error, otherwise it will be named “short” which contains the short URL. (See below for an example)

// No errors
{
  "error":0,
  "short":"http:\/\/abc.mcatbui.net/\/short\/DkZOb"
}
// An error has occurred
{
  "error":1,
  "msg":"Please enter a valid email"
}

Using plain text format

You can now request the response to be in plain text by just adding &format=text at the end of your request. This will return justhttp://gempixel.com/short/DkZOb instead of the JSON response. Note that if an error occurs, it will not output anything.

Using the API in PHP

To use the API in your PHP application, you have to send a GET request through file_get_contents or cURL: Both are reliable methods. You can see a sample code below using file_get_contents.

 

Hãy kiểm tra các mẫu tại /shortener/developer.html và sao chép các mẫu hoặc viết trang nhà phát triển của riêng bạn.

We are social

Facebook Likes

Like us on FacebookFollow us on Twitter