Skip to content

A short link is a powerful marketing tool when you use it carefully. It is not just a link but a medium between your customer and their destination. A short link allows you to collect so much data about your customers and their behaviors.

License

Notifications You must be signed in to change notification settings

Resquiller-Technologies/Way-Url

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Way Url Shortener PHP API Wrapper

The official API wrapper for Way Url Shortener

Help Contribute

Send us pull requests and help improve the code.

Your first integration

The example below shows you how to shorten a URL without any other parameters. You need to get your API key from the settings page of the user control panel

include("Shortener.php");

$shortener = new wayurl\Shortener();

// Set the URL & API key
$shortener->setURL("https://wayurl.com/api");
$shortener->setKey("APIKEY");

// Simple call
echo $shortener->shorten("https://resquiller.com");

Get short URL directly

To get the Short URL directly without having to deal with json you can chain the getShort() method as below

// Get short URL directly
echo $shortener->getShort()->shorten("https://resquiller.com");

Advanced Call

To customize the URL, you can use the below to set a custom alias and the format - which in this case is in text

// Custom Alias
$shortener->setCustom("resquiller");

// Format: text or json
$shortener->setFormat("text");

echo $shortener->shorten("https://resquiller.com");

Unshorten a URL or Get more data

This sample allows you to unshorten a URL and some data

echo $shortener->unshorten("https://wayurl.com/resquiller");

About

A short link is a powerful marketing tool when you use it carefully. It is not just a link but a medium between your customer and their destination. A short link allows you to collect so much data about your customers and their behaviors.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages