Ik wil graag van een site gegevens af halen om zo zelf statistieken op te kunnen bouwen. Echter moet ik inloggen op die site en dat is dan ook meteen het grootste probleem. Ik gebruik een curl class die https ondersteund. Verder heb ik al veel dingen geprobeerd maar het wil gewoon niet lukken.. misschien zie ik iets over het hoofd.
Ik gebruik deze class: http://www.phpfour.com/blog/2008/01/20/php-http-class/
De loginpagina waar ik wil inloggen is https://shop.playrohan.com/Login/Login.html
En de code waar ik het al mee geprobeerd heb:
Voordat het form gesubmit wordt gaat het eerst nog door een javascriptje heen die het een en ander checked waarna deze vervolgens het form submit. Ik weet niet of het daar toevallig iets mee te maken kan hebben?
Alvast bedankt.
Ik gebruik deze class: http://www.phpfour.com/blog/2008/01/20/php-http-class/
De loginpagina waar ik wil inloggen is https://shop.playrohan.com/Login/Login.html
En de code waar ik het al mee geprobeerd heb:
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #FF8000]// Include the Http Class[/COLOR]
[URL="http://www.php.net/include_once"]include_once[/URL][COLOR= #007700]([/COLOR][COLOR= #DD0000]class.http.php[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Instantiate it[/COLOR]
[COLOR= #0000BB]$http[/COLOR] [COLOR= #007700]= new[/COLOR] Http[COLOR= #007700]();[/COLOR]
[COLOR= #FF8000]// POST method[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]setMethod[COLOR= #007700]([/COLOR][COLOR= #DD0000]POST[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// POST parameters[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]addParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]ru[/COLOR] [COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]addParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]rq[/COLOR] [COLOR= #007700],[/COLOR] [COLOR= #DD0000][/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]addParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]sslchk[/COLOR] [COLOR= #007700],[/COLOR] [COLOR= #DD0000]6F6E[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]addParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]login[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]geitje[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]addParam[COLOR= #007700]([/COLOR][COLOR= #DD0000]password[/COLOR][COLOR= #007700],[/COLOR] [COLOR= #DD0000]****[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #FF8000]// Referrer[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]setReferrer[COLOR= #007700]([/COLOR][COLOR= #DD0000]https://shop.playrohan.com/Login/Login.html[/COLOR][COLOR= #007700]);[/COLOR]
[COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]execute[COLOR= #007700]([/COLOR][COLOR= #DD0000]https://shop.playrohan.com/Login/Login_Ok.html[/COLOR][COLOR= #007700]);[/COLOR]
[URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$http[/COLOR][COLOR= #007700]->[/COLOR]result[COLOR= #007700];[/COLOR]
?> Voordat het form gesubmit wordt gaat het eerst nog door een javascriptje heen die het een en ander checked waarna deze vervolgens het form submit. Ik weet niet of het daar toevallig iets mee te maken kan hebben?
Alvast bedankt.