How can I make a HTML Form with this API code?

To generate a url via the API, send a POST or GET request to the site in the following format:

- domain/index.php?api=1&return_url_text=1&longUrl={The inputted URL}

Then generate the short url and return it as plain text. i.e:

- domain/a1

Generate & Redirect
If you remove the return_url_text param the user will be redirected to the results page on this site instead of just the url text being returned.

Extra Params:
You can also set extra information on each short url, the supported params are:

customUrl => Custom short url.
shortUrlPassword => Password to access the url.
shortUrlExpiryDate => Expiry date in the form DD-MM-YYYY HH:II:SS.
shortUrlUses => Total permitted uses before expiring.
postToTwitter => Set to 1 to auto redirect to Twitter.

How to make a form with this API Codes? This is for my assignment in school. Can you teach me? Thanks! A submit button that connects the URL with this link "domain/index.php?api=1&return_url_text=1&longUrl=(Here is the URL)".
 
Back
Top