View Full Version : Quercus and opening URLs

01-05-2012, 10:06 PM
Hey Forum,

I got a little further since the last time I posted a message but I've run into a new problem. For my website I'm using the icepay payment provider to handle payments. The provider has some code that I use and its failing with an error saying a URL cannot be read:
Error reading https://pay.icepay.eu/basic/?type=CREDITCARD&checkout=yes&ic_redirect=no&ic_country=00&ic_language=EN&ic_fp=<hash>

The code that generates this is the following

if (!$this->streamMethod) $this->streamMethod = $this->getStreamMethod();

if ($this->streamMethod == "fopen"){
$ctx = @stream_context_create($params);
$fp = @fopen($url, 'rb', false, $ctx);
if (!$fp)
$this->doLogging( "Error opening $url" );
throw new Exception( "Error opening $url" );
$response = @stream_get_contents($fp);

Obviously this code works fine in regular old PHP (They wouldn't provide it to their customers if it weren't, plus it works for me on my test server). So I don't know from where I should copy and paste and what part of the code fails. I cannot remove this code since I have to get the website to work with the payment provider. Anyone have an idea of how I can fix this code. Thanks.