cURL uitgang = bedoeling?

Gestart doorSanderc4 reacties13 weergaven

5 berichten · pagina 1 van 1

Sanderc

Lid · Topicstarter

Berichten
11.263
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Oke, ik heb dus dit script:

[COLOR= #0000BB]<?php[/COLOR] 
                 
[URL="http://www.php.net/if"]if[/URL][COLOR= #007700]([/COLOR][URL="http://www.php.net/isset"]isset[/URL][COLOR= #007700]([/COLOR][COLOR= #0000BB]$_POST[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]submit[/COLOR][COLOR= #007700]])) 
{[/COLOR] 
    [COLOR= #0000BB]$ch[/COLOR] [COLOR= #007700]=[/COLOR] curl_init[COLOR= #007700]([/COLOR][COLOR= #DD0000]"http://multisess.clayweb.nl/inloggen.php"[/COLOR][COLOR= #007700]);[/COLOR]   
                         
        curl_setopt[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POST[COLOR= #007700],[/COLOR] true[COLOR= #007700]);[/COLOR] 

        curl_setopt[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700],[/COLOR] CURLOPT_POSTFIELDS[COLOR= #007700],[/COLOR] [COLOR= #DD0000]"AccountId="[/COLOR] [COLOR= #007700].[/COLOR][COLOR= #0000BB]$account[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]"&pass="[/COLOR][COLOR= #007700].[/COLOR][COLOR= #0000BB]$pass[/COLOR][COLOR= #007700].[/COLOR][COLOR= #DD0000]""[/COLOR][COLOR= #007700]);[/COLOR]  

        curl_exec[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);[/COLOR]  
        
            [URL="http://www.php.net/if"]if[/URL] [COLOR= #007700]([/COLOR]curl_errno[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]))  
            {[/COLOR] 
                [URL="http://www.php.net/print"]print[/URL] curl_error[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]); 
                            
            }[/COLOR] 
            [URL="http://www.php.net/else"]else[/URL] 
            [COLOR= #007700]{[/COLOR] 
                curl_close[COLOR= #007700]([/COLOR][COLOR= #0000BB]$ch[/COLOR][COLOR= #007700]);                  
            } 
}[/COLOR] 
[URL="http://www.php.net/else"]else[/URL] 
[COLOR= #007700]{[/COLOR] 
?> 
<form method="POST" action="[COLOR= #0000BB]<?[/COLOR] [URL="http://www.php.net/echo"]echo[/URL] [COLOR= #0000BB]$_SERVER[/COLOR][COLOR= #007700][[/COLOR][COLOR= #DD0000]PHP_SELF[/COLOR][COLOR= #007700]];[/COLOR]  ?>" name="login"> 
    <table width="100%"> 
        <tr align="center"> 
            <td width="50%" align="right"><font color="navy">Account ID</font></td> 
            <td width="50%" align="left"><input type="text" name="account" size="10"></td> 
        </tr> 
                 
        <tr align="center"> 
            <td width="50%" align="right" width="100"><font color="navy">Password</font></td> 
            <td width="50%" align="left"><input type="password" size="10" name="pass"></td> 
        </tr> 
        <tr> 
            <td>&nbsp;</td> 
        </tr> 
        <tr align="center"> 
            <td colspan="2" align="center"><input name="submit" type="submit" value="Inloggen"></td> 
        </tr> 
             
    </table> 
</form> 
[COLOR= #0000BB]<?php[/COLOR]
[COLOR= #007700]}[/COLOR] 
?>


Nu, ik gebruik deze tut:

http://www.sitemasters.be/tutorials/1/1/437/PHP/CURL_nader_verklaard

Ik gebruik nu als url multisess van Aarclay (
Afbeelding
)
http://multisess.clayweb.nl/inloggen.php

Maar nu als ik de demo gegevens invul, gaat het niet naar menu maar dan gaat het terug naar die inlog pagina.
Ik weet niet of dit de bedoeling is of niet?

Kan iemand me uitleggen of het de bedoeling is en wat ik dan zou fout doen?

Thanks
0
Berichten
3.112
Reputatie
0
Punten
0,00
Lid sinds
Laatst gezien
Hmm.

Misschien een cookie instellen?
0
Berichten
14.025
Reputatie
1
Punten
0,01
Lid sinds
Laatst gezien
[No message]
0
Rik

Lid

Berichten
18.393
Reputatie
0
Punten
0,04
Lid sinds
Laatst gezien
Je moet inderdaad cookies instellen en een cookiefile maken en chmodden zodat je het kan beschrijven.
0
Berichten
10.421
Reputatie
4
Punten
0,00
Lid sinds
Laatst gezien
Eerst zelf even inloggen en een SessieID aanmaken, welke je als cookie kan gebruiken.
Zo heb ik ook op Tweakers.net een dynamische signature gemaakt.
0

Jouw reactie

Deel je idee, stel een vraag of help een ander verder.

Editor laden…

Praat mee met de One2xs-community.

Inloggen om te reageren