/ Published in: PHP

Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
// pass the url you want to shorten in $url when calling the fucntion // second arugument return the qr code url of the shortened goo.gl url // getgool("http://www.thisisthelongurltoshorten.com", TRUE); function getgoogl($url, $qr=NULL){ if ($headerInfo['http_code'] === 201){ // HTTP Code 201 = Created return $results->short_url.$qr; } return FALSE; } return FALSE; } return FALSE; }
Comments
