To generate just insert your long link into the field above, then press "enter" or the button on the right. In the area below appears a ready-made link and a QR-code for it. As you can see, it's very simple.
Be careful, the link must be valid. If you insert a full URL with scheme (protocol usually), make sure that its matches one in this list: source. Or, refuse to insert the full link. An example of a valid URL: example.com, as well as http://example.com/nel/mezzo/del/cammin?di=nostra#vita.
Telegram (bot): @easylink_bot<?phpAnswer:
/* Using file_get_contents(): */
file_get_contents( 'https://el1nk.com/api?url=example.com' );
/* Using cURL: */
$query = http_build_query( [
'url' => "example.com",
'password' => '1234',
] );
$curl = curl_init();
$url = "https://el1nk.com/api";
curl_setopt( $curl, CURLOPT_URL, $url );
curl_setopt( $curl, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $curl, CURLOPT_POST, 1 );
curl_setopt( $curl, CURLOPT_POSTFIELDS, $query );
$result = curl_exec($curl);
curl_close($curl);
{"error":false,"original":"example.com","short":"https:\/\/el1nk.com\/B","qr":"https:\/\/el1nk.com\/qr\/show\/55268.png","password":"","statistics":"https:\/\/el1nk.com\/stat\/58","private":false}If there's an error you'll see something like this:
{"error":{"cause":"empty string"}}