I enabled
CURLOPT_HEADER
That prints the headers and that showed me that there was a redirect.
Without FOLLOWLOCATION curl doesn't follow that redirect. With FOLLOWLOCATION set to 1 curl follows the redirect.
In PHP that redirect would look like:
header("Location: /somescript.php");
The login script of that site checks if the submitted data is valid and then redirects to (I think) user.php.
The use of CURLOPT_FOLLOWLOCATION shouldn't affect the behaviour of your script. The curl options affect the curl session only ... not your script.
One example of when to set this option to 0:
You login with curl and then don't want to get the contents of the page the site redirect you to. You just want to get the session cookie and then to get the contents of another page that needs a valid session cookie.
Thomas