Hi Anirudh
Many thanks for your help. Though because I was pulling my hair out, I
jumped ship and got it working with Perl.
Saying that, if I need to webbify the app then I may moved back to PHP.
Thanks again.
Rashid
2008/6/6 Anirudh (Google) <[EMAIL PROTECTED]>:
>
> Hi Rashid,
>
> I tried running XAMPP on a windows machine and was able to reproduce
> your problem.
> To use SSL correctly with your XAMPP configuration, you will have to
> set the location of your certificate file using the cURL options
> before posting data.
>
> You can modify the function 'ExecutePost' in common.php to look
> something like:
>
> function ExecutePost($post_url, $post_document) {
>
> /* Create a cURL handle. */
> $ch = curl_init();
>
> //Specify the location of certificate file
> $ca_file = "..\..\apache\conf\ssl.crt\ca-bundle.crt";
>
> /* Set cURL options. */
> curl_setopt($ch, CURLOPT_URL, $post_url);
> curl_setopt($ch, CURLOPT_POST, true);
>
> // Set SSL options
> curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 1);
> curl_setopt($ch, CURLOPT_CAINFO, $ca_file);
>
> curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
> curl_setopt($ch, CURLOPT_POSTFIELDS, $post_document);
>
> $result = curl_exec($ch); /* Execute the HTTP request. */
> curl_close($ch); /* Close the cURL handle. */
>
> return $result;
> }
>
> -Anirudh
>
>
> On Jun 5, 4:55 am, "Rashid Jeffrey" <[EMAIL PROTECTED]>
> wrote:
> > Hi Anirudh
> >
> > Thanks for your comments.
> >
> > Yes, I have internet connectivity...
> >
> > I put a few echo lines into the script. The returned value, being
> $result,
> > is a blank/empty string. So I can't tell if the request is being
> > successfully authenticated and no error code is returned either. In fact,
> > even if gibberish is entered into the domain, email address and password
> > fields, then $result is still a blank/empty string.. Ho hum.
> >
> > I note that the post url in the sample script uses https. I am running
> > PHP/Apache via XAMPP on WinXP. I found a couple of sites that mentioned
> that
> > additional DLLs must be present on the path for SSL protocols to work,
> > namely libeay32.dll and ssleay32.dll.
> >
> > http://curl.haxx.se/libcurl/php/install.html
> >
> > Alas, still no joy.
> >
> > Rashid
> >
> > 2008/6/4 Anirudh (Google) <[EMAIL PROTECTED]>:
> >
> >
> >
> > > Hi Rashid,
> >
> > > The token is generated by Google servers and is sent to the client
> > > which in this case is reportingdemo.php.
> > > As long as you have http (internet) connectivity and valid
> > > credentials, you can get the token from Google services. It does not
> > > matter if the client is localhost. Please check your proxy settings to
> > > make sure you have connectivity to Google.
> >
> > > Also, could you please let us know the error that you are receiving.
> >
> > > Thanks,
> > > Anirudh
> >
> > > On Jun 3, 8:39 am, "Rashid Jeffrey" <[EMAIL PROTECTED]>
> > > wrote:
> > > > Hi,
> > > > I am running the script reportingdemo.php which is part of the
> example
> > > code
> > > > 'Google Apps Reporting API Java client library' [
> > >
> http://code.google.com/p/google-apps-reporting-api-client/downloads/list].
> >
> > > > My colleague set it up on his public facing Linux server and it works
> > > fine.
> > > > However when set up locally using XAMPP, we fail to get a token
> generated
> > > > from localhost. So could the problem be to do with using localhost?
> >
> > > > Note: CURL is set up correctly as we can see it on phpinfo() and a
> test
> > > page
> > > > works too.
> >
> > > > Many thanks in advance, Rashid
> >
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Apps APIs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/google-apps-apis?hl=en
-~----------~----~----~----~------~----~------~--~---