/ Published in: PHP
I needed a simple function to shorten a link with goo.gl and wrote this, thought it may help someone. Note: you still need an API key from goo.gl
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getgoogl($glurl, $apikey) { CURLOPT_POST => TRUE, CURLOPT_RETURNTRANSFER => TRUE, )); return $chresults->id; }