Note that there are some explanatory texts on larger screens.

plurals
  1. POcall url by php and checking if logged in
    primarykey
    data
    text
    <p>Given <strong>url</strong> (<em>https://127.0.0.1:8443/example.html &lt;- yes it's secure connection</em>) is checking if user is logged in (by jboss server) and if so, he has permissions to some content.</p> <p>When I logged in and try to run this <strong>url</strong> in browser, everything is ok, jboss logger shows that user is logged in, but when I call <strong>file_get_content(url)</strong> from php script (<em>http://127.0.0.1/test/check &lt;- codeigniter url, code below</em>) user always is logged out in jboss. Don't know why.</p> <p>I've tried <strong>curl</strong> library, as well without success.</p> <pre><code>public function check(){ echo 'begin'; // $total_rows = file_get_contents('https://127.0.0.1:8443/example.html?shopId=121'); $total_rows = $this-&gt;getUrl('https://127.0.0.1:8443/example.html', '121'); print_r($total_rows); echo 'end'; } function getUrl($url, $shopId ='') { $post = 'shopId=' . $shopId; $ch = curl_init(); // curl_setopt($ch, CURLOPT_PORT, 8443); curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY); // curl_setopt ($ch, CURLOPT_CAINFO, dirname(__FILE__)."/../../files/cacert.pem"); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, $post); // curl_setopt($ch, CURLOPT_HTTPHEADER, Array("Secure Content-Type: text/html; charset=UTF-8")); // curl_setopt($ch, CURLOPT_HTTPHEADER, array('Host: 127.0.0.1:8443')); $ret = curl_exec($ch); curl_error ($ch ); curl_close($ch); return $ret; } </code></pre>
    singulars
    1. This table or related slice is empty.
    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.
 

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