Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>they may be handing you a session cookie upon first pageload</p> <p>try making a request with CURLOPT_COOKIEJAR and then make the login request using CURLOPT_COOKIEFILE and CURLOPT_COOKIEJAR</p> <p>also for the hell of it, this is a function i make to make requests look cleaner</p> <pre><code>function curl_http_request ($url, $options) { $handle = curl_init($url); curl_setopt_array($handle, $options); ob_start(); $buffer = curl_exec($handle); ob_end_clean(); curl_close($handle); return $buffer; } </code></pre> <p>example of use</p> <pre><code>$options = array( CURLOPT_RETURNTRANSFER =&gt; TRUE ); curl_http_request($url, $options); </code></pre> <p>this should work</p> <pre><code>// set global curl options $curloptions = array( CURLOPT_USERAGENT =&gt; 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6', CURLOPT_TIMEOUT =&gt; 60, CURLOPT_COOKIEJAR =&gt; $cookie, CURLOPT_COOKIEFILE =&gt; $cookie, CURLOPT_REFERER =&gt; 'http://www.meetup.com/' ); // set userinfo $username = 'bobsmit@gmail.com'; $password = 'bobsmit@gmail.com'; $cookie = 'cookie.txt'; // clear cookie.txt (fresh session) $handle = fopen($cookie, 'w'); fclose($handle); // make a dummy request to generate a session curl_http_request('http://www.meetup.com/login/', $curloptions); // login curl_http_request('http://www.meetup.com/login/', array( CURLOPT_POSTFIELDS =&gt; 'email=' . urlencode($username) . '&amp;password=' . urlencode($password) . '&amp;rememberme=on&amp;submitButton=Login&amp;returnUri=http%3A%2F%2Fwww.meetup.com%2F&amp;op=login', CURLOPT_POST =&gt; TRUE ), $curloptions ); //example request echo curl_http_request('http://www.meetup.com/account/', array( CURLOPT_FOLLOWLOCATION =&gt; TRUE, CURLOPT_RETURNTRANSFER =&gt; TRUE ), $curloptions ); function curl_http_request ($url, $moreoptions = array(), $options = array()) { foreach ($moreoptions as $k =&gt; $v) $options[$k] = $v; $handle = curl_init($url); curl_setopt_array($handle, $options); ob_start(); $buffer = curl_exec($handle); ob_end_clean(); curl_close($handle); return $buffer; } </code></pre> <p>hope this one works :)</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. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      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