PHP Classes

Not Working

Recommend this page to a friend!

      Goo.gl short URL  >  All threads  >  Not Working  >  (Un) Subscribe thread alerts  
Subject:Not Working
Summary:In Localhost Not Working
Messages:10
Author:Sushovan Mukherjee
Date:2011-01-15 13:24:35
Update:2012-03-30 23:44:06
 

  1. Not Working   Reply   Report abuse  
Picture of Sushovan Mukherjee Sushovan Mukherjee - 2011-01-15 13:24:35
I have tested in localhost. It does not work

  2. Re: Not Working   Reply   Report abuse  
Picture of Eslam Mahmoud Eslam Mahmoud - 2011-01-16 17:07:05 - In reply to message 1 from Sushovan Mukherjee
check if Curl enabled from your phpinfo()

  3. Re: Not Working   Reply   Report abuse  
Picture of Sushovan Mukherjee Sushovan Mukherjee - 2011-01-16 17:17:33 - In reply to message 2 from Eslam Mahmoud
Curl is enabled and the var_dump is showing :

Array ( [error] => Array ( [errors] => Array ( [0] => Array ( [domain] => global [reason] => badRequest [message] => Bad Request ) ) [code] => 400 [message] => Bad Request ) )

  4. Re: Not Working   Reply   Report abuse  
Picture of Eslam Mahmoud Eslam Mahmoud - 2011-01-16 17:22:56 - In reply to message 3 from Sushovan Mukherjee
using set_short or get_long ?

  5. Re: Not Working   Reply   Report abuse  
Picture of Sushovan Mukherjee Sushovan Mukherjee - 2011-01-16 17:27:47 - In reply to message 4 from Eslam Mahmoud
using set_short

  6. Re: Not Working   Reply   Report abuse  
Picture of Eslam Mahmoud Eslam Mahmoud - 2011-01-16 17:45:50 - In reply to message 5 from Sushovan Mukherjee
investigating that right now but working fine for me on my localhost, will look more into the problem

  7. Re: Not Working   Reply   Report abuse  
Picture of Eslam Mahmoud Eslam Mahmoud - 2011-01-18 08:30:00 - In reply to message 5 from Sushovan Mukherjee
i have tested it on my computer and on other computers in different environments but it works just fine !!

  8. Re: Not Working   Reply   Report abuse  
Picture of D K D K - 2011-01-18 09:37:50 - In reply to message 6 from Eslam Mahmoud
Do you still have exclude //$goo = new Googl("APIKey");//if you have an api key

  9. Re: Not Working   Reply   Report abuse  
Picture of Eslam Mahmoud Eslam Mahmoud - 2011-01-18 09:46:53 - In reply to message 8 from D K
if you have an API key you should use it as

$goo = new Googl("YourAPIKey");
$r = $goo->set_short("http://hunikal.com/");
print_r($r);

or if you don't have a key use it as

$goo = new Googl();
$r = $goo->set_short("http://hunikal.com/");
print_r($r);

  10. Re: Not Working   Reply   Report abuse  
Picture of sici sici - 2012-03-30 23:44:06 - In reply to message 9 from Eslam Mahmoud
How can I read the array from the api ?

This brings me!
Array ( [kind] => urlshortener#url [id] => http://goo.gl/wzv8 [longUrl] => http://hotmail.com/ )