I'm looking for a simple example where I can feed through a long link using the Google API and then shorten it with the API and output the results. I already have a DB setup with the long links, and want to loop through the DB and do this multiple times until all long links in the DB are shortlinked and then printed out.
Does anyone have a working solution for this or an example to get me started? Would be greatly appreciated.
Thanks in advance for your help!
From the Google APIs Client Library for PHP, there is an example for urlshortener. It boils down to: