Jump to content

Convert a cURL cookie into a valid Opera cookie?


ionicle

Recommended Posts

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" ...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.