ionicle Posted December 15, 2013 Share Posted December 15, 2013 This isn't exactly a PHP issue I'm having, but it is indeed related to cURL in a way, so here it goes: How can I convert a cURL/Netscape style cookie into a valid Opera/IE cookie for usage with one of those browsers? Is that even doable? Link to comment https://forums.phpfreaks.com/topic/284775-convert-a-curl-cookie-into-a-valid-opera-cookie/ Share on other sites More sharing options...
sKunKbad Posted December 16, 2013 Share Posted December 16, 2013 Have you tried using setcookie ? I don't think you are going to find a way to do it automatically, but whatever data is in the cURL cookie, just pass it along to setcookie. Link to comment https://forums.phpfreaks.com/topic/284775-convert-a-curl-cookie-into-a-valid-opera-cookie/#findComment-1462503 Share on other sites More sharing options...
dalecosp Posted December 17, 2013 Share Posted December 17, 2013 The comments on the manual page for curl_setopt include this: <?php function _curl_parse_cookiefile($file) { $aCookies = array(); $aLines = file($file); foreach($aLines as $line){ if('#'==$line{0}) continue; $arr = explode("\t", $line); if(isset($arr[5]) && isset($arr[6])) $aCookies[$arr[5]] = $arr[6]; } return $aCookies; } ?> Props to "prohfesor@gmail" ... Link to comment https://forums.phpfreaks.com/topic/284775-convert-a-curl-cookie-into-a-valid-opera-cookie/#findComment-1462564 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.