Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>try using something like</p> <pre><code>$ckfile = tempnam ("/", "CURLCOOKIE"); </code></pre> <p>here's sample way to do it</p> <pre><code>&lt;?php $ckfile = tempnam ("/", "CURLCOOKIE"); $ch = curl_init ("http://somedomain.com/"); curl_setopt ($ch, CURLOPT_COOKIEJAR, $ckfile); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec ($ch); $ch = curl_init ("http://somedomain.com/cookiepage.php"); curl_setopt ($ch, CURLOPT_COOKIEFILE, $ckfile); curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec ($ch); /* here you can do whatever you want with $output */ ?&gt; </code></pre> <p><strong>EDIT</strong></p> <pre><code>class CURL { var $callback = false; function setCallback($func_name) { $this-&gt;callback = $func_name; } function doRequest($method, $url, $vars) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_USERAGENT, $_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); if ($method == 'POST') { curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $vars); } $data = curl_exec($ch); curl_close($ch); if ($data) { if ($this-&gt;callback) { $callback = $this-&gt;callback; $this-&gt;callback = false; return call_user_func($callback, $data); } else { return $data; } } else { return curl_error($ch); } } function get($url) { return $this-&gt;doRequest('GET', $url, 'NULL'); } function post($url, $vars) { return $this-&gt;doRequest('POST', $url, $vars); } } ?&gt; </code></pre> <p>got it from <a href="http://php.net/manual/en/ref.curl.php" rel="nofollow">here</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload