I am trying to use for my own Website this Script https://github.com/briancray/PHP-URL-Shortener. On the Readme it tells this here
To programmatically shorten URLs with PHP use the following code:
$shortenedurl = file_get_contents('http://yourdomain.com/shorten.php?longurl=' . urlencode('http://' . $_SERVER['HTTP_HOST'] . '/' . $_SERVER['REQUEST_URI']));
If i add this Code to any Page of my Website it should shorten the actually Sites Link. But it will not show me the Link and Shorten it.
Doing
would only shorten it and save it as a variable. To display it, you will need to display the contents of the variable using
echo. Try this: