What you want to do is almost impossible ... They applied several redirects with several methods and security tokens ... Let me explain:
At first, I thought I was redirecting header (), but when I used Tamper Data , the picture became clearer:
1) When you open https://portal.hhs.nl , you are redirected by some meta tags
<META name="verify-v1" content="Yh6PvgPdX64Vdo9akXqTvstTouu9uQcvrPpFaL9jqZs=" /> <META name="verify-v1" content="eiUD3J3OcF6SjBKGe5ZvkMTzVEJ9rnpr1NaCKV9OIKw=" /> <meta name="google-site-verification" content="Ka0UPoAllNqYvbuviJCk8iV64YfqfWbX6G1APHdY5tg" /> <META content="text/html; charset=windows-1252" http-equiv=Content-Type> <META content="0; URL=http://portal.hhs.nl/portal/pls/portal/PORTAL.home" http-equiv=Refresh>
So, you need to parse these meta tags and redirect ... here's how you do PHP: can CURL follow meta redirects
2) For some reason, I cannot “open” the data when I am redirected using Tamper Data strong>, so you need to do some research at this point ...
3) And here is another “redirect” technique with JavaScript !!!
<FORM NAME="SingleSignOn" METHOD="POST" ACTION="https://aselect.hhs.nl/aselectserver/server" > <INPUT TYPE="HIDDEN" NAME="request" VALUE="direct_login1" > <INPUT TYPE="HIDDEN" NAME="rid" VALUE="C741680139CA153E" > <INPUT TYPE="HIDDEN" NAME="a-select-server" VALUE="aselectserver1" > </FORM> </BODY>
Just analyze them and redirect to https://aselect.hhs.nl/aselectserver/server with these POST values ...
4) Finally, we are at https://aselect.hhs.nl/aselectserver/server , where we really enter our credentials, and where you should also analyze the data and send it with authority. After this step, you only know what is behind the portal ...
Conclusion: These safety measures make it clear that they want to stop some automated children, like us, and what if someday these steps are changed? I suggest asking the school about some APIs, I know some schools in the Netherlands that use Untis , and they have a great API that returns some JSON data!
If you insist or cannot get your hand from the API, then get ready for hard work!
Success Veel (good luck)!