Page 2 of 2
Posted: Mon May 07, 2007 4:29 am
by onion2k
tovishalck wrote:What is the difference between GPL & LGPL? As I mentioned, we are going to put it up as Open Source under the GPL license. Will that be a problem? The 3 scripts of Yahoo, Gmail & Hotmail are already GPLed.
Imagine I'm writing an application that uses your library. If my application uses a library that's released under the GPL then I have to release my entire application under the GPL too. If my application uses a library that's released under the LGPL then I have to release that library under the terms of the LGPL, but my application can be under a different license if I want it to be. That can be a closed source commercial license, or Creative Commons, or Public Domain, or anything.
I would say the real difference is that if you release the library as GPL then other open source apps might use it but noone else will. If you release it under the LGPL then anyone writing an application that needs it's functionality might use it.
One thing to note though: if you're using libraries that are under the GPL in your library then you have no choice, you have to release your library under the GPL too.
Posted: Mon May 07, 2007 5:59 am
by tovishalck
onion2k wrote:tovishalck wrote:What is the difference between GPL & LGPL? As I mentioned, we are going to put it up as Open Source under the GPL license. Will that be a problem? The 3 scripts of Yahoo, Gmail & Hotmail are already GPLed.
Imagine I'm writing an application that uses your library. If my application uses a library that's released under the GPL then I have to release my entire application under the GPL too. If my application uses a library that's released under the LGPL then I have to release that library under the terms of the LGPL, but my application can be under a different license if I want it to be. That can be a closed source commercial license, or Creative Commons, or Public Domain, or anything.
I would say the real difference is that if you release the library as GPL then other open source apps might use it but noone else will. If you release it under the LGPL then anyone writing an application that needs it's functionality might use it.
One thing to note though: if you're using libraries that are under the GPL in your library then you have no choice, you have to release your library under the GPL too.
Thanks for the information. I think we will have to freeze with GPL. Just finishing the final documentation now.
Posted: Mon May 07, 2007 9:54 am
by tovishalck
Can someone guide me on the required documentation and comments in the code? We haven't put as many comments as are seen in other open source apps. Will that be a major criteria while submitting to Sourceforge, PHPClasses, etc.?
Posted: Tue May 08, 2007 8:52 am
by feyd
Posted: Tue May 08, 2007 9:24 am
by tovishalck
Thanks. I have already included that in the scripts. Needed to know about the inline commenting of the code.
Posted: Tue Jun 26, 2007 9:59 pm
by anjanesh
Is this released yet ?
Retrieving many of google's data is easy once logged in since they provide a lot of their data in XML - but its sorted by
affinity.
Code: Select all
<?php
set_time_limit(100);
error_reporting(E_ALL);
$c = getGmailContacts("username@gmail.com", "password", $Err);
if (!$c === FALSE)
echo $c;
else
print_r($Err);
?>
<?php
function getGmailContacts($Username, $Password, &$Err)
{
$ch = curl_init();
curl_setopt ($ch, CURLOPT_POST, TRUE);
curl_setopt ($ch, CURLOPT_HEADER, FALSE);
curl_setopt ($ch, CURLOPT_USERAGENT, "phpDN");
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, TRUE);
curl_setopt ($ch, CURLOPT_REFERER, "");
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION, TRUE);
curl_setopt ($ch, CURLOPT_MAXREDIRS, 5);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);
curl_setopt ($ch, CURLOPT_FAILONERROR, 1);
curl_setopt ($ch, CURLOPT_COOKIESESSION, TRUE); # PHP5 only
curl_setopt ($ch, CURLOPT_COOKIEFILE, "cookie.txt");
curl_setopt ($ch, CURLOPT_COOKIEJAR, "cookie.txt");
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt ($ch, CURLOPT_URL, "https://www.google.com/accounts/LoginAuth?continue=http%3A%2F%2Fwww.google.com%2F&hl=en");
$Data = "";
$Data .= "continue=".urlencode("http://www.google.com/")."&";
$Data .= "nui=13&";
$Data .= "Email=".urlencode($Username)."&";
$Data .= "Passwd=".urlencode($Password)."&";
// $Data .= "PersistentCookie=Yes&";
$Data .= "rmShown=1&";
$Data .= "signIn=Sign+in&";
curl_setopt ($ch, CURLOPT_POSTFIELDS, $Data);
$contents = curl_exec($ch);
$ErrNo = curl_errno($ch);
if ($ErrNo != 0)
{
$Err[] = "cURL Error @ Login :: Error No: ".curl_errno($ch).' : '.curl_error($ch);
return FALSE;
}
if ($contents == NULL)
{
$Err[] = "contents == NULL @ Login";
return FALSE;
}
curl_setopt ($ch, CURLOPT_POST, FALSE);
curl_setopt ($ch, CURLOPT_URL, "http://www.google.com/notebook/contacts");
$contents = curl_exec($ch);
$ErrNo = curl_errno($ch);
if ($ErrNo != 0)
{
$Err[] = "cURL Error @ Contacts :: Error No: ".curl_errno($ch).' : '.curl_error($ch);
return FALSE;
}
if ($contents == NULL)
{
$Err[] = "contents == NULL @ Contacts";
return FALSE;
}
return $contents;
}
?>
This doesnt seem to work with
Google Apps.