The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.
For some reason my implementation is working perfectly whilst running on my local server, but once I upload to my Freeola service it no longer works properly.
Are there some limitations in using the Google Checkout system, perhaps relating to SSL certificates?
Would appreciate any insights.
My implementation is using the XML API rather than a simple Buy Now button incase that has any bearing.
Someone may read your last statement to mean that VIP Hosting isn't as secure as Standard Hosting!?
[s]Hmmm...[/s]
I'm afraid you won't be able to use anything that requires outbound connections on our free hosting. Your sites are using our free hosting so using cURL or fopen will not work.
It is one of the reasons we offer VIP hosting as this service has far fewer restrictions. If Google Checkout is important to you then you might want to consider VIP hosting, it's only from £3.49 per month.
I have amended my initial post to make it clear that cURL can be used with VIP and not our Free hosting.
I really appreciate all your help and look forward to hearing back!!
function SendReq($url, $header_arr, $postargs, $timeout=false) {
// Get the curl session object
$session = curl_init($url);
$this->log->LogRequest($postargs);
// Set the POST options.
curl_setopt($session, CURLOPT_POST, true);
curl_setopt($session, CURLOPT_HTTPHEADER, $header_arr);
curl_setopt($session, CURLOPT_POSTFIELDS, $postargs);
curl_setopt($session, CURLOPT_HEADER, true);
curl_setopt($session, CURLOPT_RETURNTRANSFER, true);
if(!empty($this->certPath) && file_exists($this->certPath)) {
curl_setopt($session, CURLOPT_SSL_VERIFYPEER, true);
curl_setopt($session, CURLOPT_CAINFO, $this->certPath);
}
else {
curl_setopt($session, CURLOPT_SSL_VERIFYPEER, false);
}
if(is_array($this->proxy) && count($this->proxy)) {
curl_setopt($session, CURLOPT_PROXY,
$this->proxy['host'] . ":" . $this->proxy['port']);
}
if($timeout != false){
curl_setopt($session, CURLOPT_TIMEOUT, $timeout);
}
// Do the POST and then close the session
$response = curl_exec($session);
if (curl_errno($session)) {
$this->log->LogError(curl_error($session));
return array("CURL_ERR", curl_error($session));
} else {
curl_close($session);
}
Do you have the cURL error code? I can't remember off the top of my head the format of the error message, I'm saying this because your error has a colon in it, which normally signifies a port number.
I am getting the following error message:
An error had ocurred:
HTTP Status: CURL_ERR:
Error message:
Failed to connect to 74.125.79.81: Permission denied
My understanding was always that Google Checkout relies on CURL, semi-confirmed by this error message, but as far as I can tell this is enabled by Freeola?
Thanks so much for your help folks.
> Not exactly. You can work around the block on fopen by using the
> more secure, but more involved cURL library. If you are not
> writing you own script then this may mean you have to modify it,
> which some people cannot do as they have no knowledge of PHP.
Oh fair enough - the script creator (domain WHOIS) tried changing to cURL when I last had a go with this (few years back) but couldn't get anywhere!
If I have another go at it in the future I'll get back to you.
I'll let the OP have his thread back now! ;¬)
[s]Hmmm...[/s]
(Edit: should have said this applies to VIP hosting!). If you are not writing you own script then this may mean you have to modify it, which some people cannot do as they have no knowledge of PHP.