My code is below. The URL shortening service works, but it doesn\'t when I insert my $POST
. Does anyone know how to fix this my looking at the code?
Don't have enough reputation points yet to comment, but I got this working fine by replacing the line:
echo 'Shortened URL is: '.$json->id;
with:
$shortLink = get_object_vars($json);
echo "Shortened URL is: ".$shortLink['id'];
It could be just my php installation, but the original line kept throwing a 500 Internal Error for me.