Kıvrılmaları kullanarak tanımlama bilgisi almak ve kullanıcıya bu çerez ayarlanır

0 Cevap php

I access the page with this code. Then it gets the cookie, This is my curl code:

$ckfile = tempnam ("/tmp", "CURLCOOKIE"); 

    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL,$url);
    curl_setopt($ch, CURLOPT_USERAGENT,"Mozilla/3.0 (compatible; MSIE 5.01; Windows NT 5.0)");
    curl_setopt($ch, CURLOPT_HTTPHEADER, array("REMOTE_ADDR: ".$_SERVER['REMOTE_ADDR'], "HTTP_X_FORWARDED_FOR: ".$_SERVER['REMOTE_ADDR']));
    curl_setopt($ch, CURLOPT_COOKIEJAR, $ckfile);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);

    $result = curl_exec ($ch);

Ben kullanıcıya ckfile saklanan bilgileri ayarlamak istediğiniz.

Bunu nasıl yapabilirim?

0 Cevap