Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It looks like you're trying to login to a third party system without a browser.</p> <p>It's extremely likely that this isn't working because you're not doing something that it expects, which is establishing a session cookie. Though you might be logging in <em>correctly</em>, the remote site is probably showing you the form again because nothing in your cookie is telling it to do otherwise upon redirection. The headers explain this:</p> <blockquote> <p>Set-Cookie: SESSIONID_portalApp=xxxxxx!-xxx!xxx; path=/</p> </blockquote> <p>Create a cookie file for cURL to use (using something like <a href="http://php.net/tempnam" rel="nofollow"><code>tempnam()</code></a>) and tell cURL where it lives using the <code>CURLOPT_COOKIEJAR</code> directive. You could also grab an existing cookie from your browser and try, as an additional way to troubleshoot.</p> <p>Add this prior to initializing cURL:</p> <pre><code>$cookieFile = tempnam('/dev/shm', 'curlCookie_'); </code></pre> <p>Then tell cURL to use it:</p> <pre><code>curl_setopt($ch, CURLOPT_COOKIEJAR, $cookieFile); </code></pre> <p>I suggested <code>/dev/shm</code> because it's obliterated across reboots, you could create it anywhere you have the ability to do so. Just take care to remove them when no longer needed. You can also change the prefix to make the individual files easier to associate with individual requests (timestamp, PID, etc), handy for debugging.</p> <p>Also make sure that you set the user agent string to something known to be acceptable to the remote site. Remember, it expects a browser - so you have to be sure you behave like one. Setting <code>CURLOPT_FOLLOWLOCATION</code> true is probably a good idea, as suggested in comments.</p> <p>If that doesn't work, do the action normally in a browser and look at the pages closely. It could be that JS is required in order for a session to be properly constructed .. at which point you're kind of out of luck just using cURL.</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.
 

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