Problem polega na tym, że mam funkcję obsługującą dotpay w której zmieniłem fopen na curl jednak jest problem z funkcją fgets po takiej zmienie pojawia się błąd:
ErrorException [ 2 ]: fgets() expects parameter 1 to be resource, string given ~ MODPATH/site_payment/classes/dotpay.php [ 30 ]
{ self::_init(); $url = "http://dotpay.pl/check_code.php?id=".self::$_config['client_id']."&code=".$service."&check=".$code."&type=".self::$_config['account_type']."&del=".self::$_config['delete_codes']; $ch = curl_init(); $timeout = 5; curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); $handle = curl_exec($ch); curl_close($ch); /*$handle = fopen($url, 'r');*/ if ($status == 0) { return TRUE; } return FALSE; }
Byłby ktoś w stanie pomóc mi z tym problemem? będę bardzo wdzięczny.