Note that there are some explanatory texts on larger screens.

plurals
  1. POUsing curl with PHP to authenticate - mysterious security
    primarykey
    data
    text
    <p>I'm trying to make a script that would run through some sites that I visit every day and get the most interesting info/statistics from them. I wanted to use curl for this purpose, because some of these sites require authentification. Everything was ok until I bumped into the site: rossnet.pl which seems to be somehow secured 'cause I can't authenticate myself at all.</p> <p>The form that I want to use can be found here: <a href="https://www.rossnet.pl/rossnetlogin.aspx" rel="nofollow">https://www.rossnet.pl/rossnetlogin.aspx</a></p> <p>On the left, under the text: "Mam konto w Rossnet.pl - Logowanie". It doesn't seem to have any hidden input fields, only two text fields for credentials, called: - "dnn$ctr1203$ViewLogin$txtUserLogin" - "dnn$ctr1203$ViewLogin$txtUserPass"</p> <p>I'm using the code shown below but the page returned by the server seems as if exactly nothing happened (no error messages, it seems to look the same as when I don't send any POST data).</p> <p>Does anyone have a clue about what may be wrong? In the code below I put in actual account credentials for you to be able to test the script if you wish to help me.</p> <p>Here you can see how does the script below work on my server: <a href="http://kremuwa.netii.net/rossman/skrypt.php" rel="nofollow">http://kremuwa.netii.net/rossman/skrypt.php</a> </p> <pre><code>&lt;?php $url = "https://www.rossnet.pl/rossnetlogin.aspx"; $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_COOKIEJAR, 'cookie.txt'); curl_setopt($ch, CURLOPT_COOKIEFILE, 'cookie.txt'); curl_setopt($ch, CURLOPT_USERAGENT, 'Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.13) Gecko/20101206 Ubuntu/10.10 (maverick) Firefox/3.6.13'); curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); curl_setopt($ch, CURLOPT_REFERER, $url); curl_setopt($ch, CURLOPT_POST, 1); curl_setopt($ch, CURLOPT_POSTFIELDS, 'dnn$ctr1203$ViewLogin$txtUserLogin=warzywko3000&amp;dnn$ctr1203$ViewLogin$txtUserPass=password123'); $output = curl_exec($ch); curl_close($ch); echo $output; ?&gt; </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