Jump to content
php.lv forumi

curl nesaglabā cookies


EdgarsK

Recommended Posts

Sveiki,

ceru uz Jūsu atsaucību.

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_COOKIEJAR, dirname(__FILE__)."/cookie.ini"); 
curl_setopt($ch, CURLOPT_COOKIEFILE, dirname(__FILE__)."/cookie.ini"); 
curl_setopt($ch, CURLOPT_HEADER,1);
$curl = curl_exec($ch);
curl_close ($ch);

Viss curl process notiek veiksmīgi, bet COOKIEFILE netiek saglabāts, savukārt COOKIEJAR tiek saglabāts

cookie.ini COOKIEJAR

# Netscape HTTP Cookie File

# http://curlm.haxx.se/rfc/cookie_spec.html

# This file was generated by libcurl! Edit at your own risk.

 

mans_domens.lv FALSE / FALSE 0 PHPSESSID 2cg7jkb8svhvqotbq9m7mioem2

Ja es aizkomentēju COOKIEJAR, tad cookie.ini netiek izveidots.

Vai ir kāds iemesls kapēc COOKIEFILE nefunkcionē?

 

Esmu uz win, ar chmodiem nav problēmu.

Edited by EdgarsA
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...