socket und login

Einklappen
X
 
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • socket und login

    Hallo,

    Ich möchte ein kleines Scritp programmieren, das sich erst einloggt und dann im Kundenbereich einer Website einstellungen vornimmt.

    Ich nehme mal an eine Socketverbindung lässt keine Cookies zu, also muss per Socket das Login-Formlar abschicken, die SID aus der URL auslesen und mittels derer dann das zweite formular abschicken.

    leider habe ich keine ahnung wie ich das umsetzen kann..

    Gruß,
    syco
    [COLOR=darkblue].: 1+1=23 :.[/COLOR]

  • #2
    der ansatz ist richtig, würd ich sagen. fang an, evtl. erst mal mit abstraktem pseudo-code und dir wird geholfen.

    Kommentar


    • #3
      Ich hab mich jetzt hingesetzt, aber scheitere schon am Login mit Snoopy.

      folgendes html-Formular funktionert:

      Code:
      <form method="POST" action="http://www.unonic.com/user/login_check.php" name="s" STYLE="display:inline">
      <input type="hidden" name="LANG" value="DE">
      <input type="text" name="domname" size="20" maxlength="26" style="font-family: monospace">
      
      <select size="1" name="whatsub" tabindex="6">
      <OPTION value=".de.tf">.de.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".at.tf">.at.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".co.at.tf">.co.at.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".ch.tf">.ch.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".net.tf">.net.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".eu.tf">.eu.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".us.tf">.us.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".eu.tf">.eu.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".ca.tf">.ca.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".int.tf">.int.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".edu.tf">.edu.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".ru.tf">.ru.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".pl.tf">.pl.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".cz.tf">.cz.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".bg.tf">.bg.tf&nbsp;&nbsp;&nbsp;</OPTION>
      <OPTION value=".sg.tf">.sg.tf&nbsp;&nbsp;&nbsp;</OPTION>
      </select>
      
      <input type="password" name="pwd" size="20" maxlength="25" style="font-family: monospace">
      
      <input type="submit">
      
      </form>
      folgender Code aber nicht:

      PHP-Code:
      include "../includes/Snoopy.class.php";
      $snoopy = new Snoopy;
      $snoopy->referer "http://www.unonic.com/user/?LANG=DE";
      $snoopy->agent "(compatible; MSIE 4.01; MSN 2.5; AOL 4.0; Windows 98)";
      $submit_url "http://www.unonic.com/user/login_check.php";
      $submit_vars['LANG'] = "DE";
      $submit_vars['pwd'] = "***";
      $submit_vars['domname'] = "***";
      $submit_vars['whatsub'] = ".eu.tf";


      $snoopy->submit($submit_url,$submit_vars,$submit_files);

      while(list(
      $key,$val) = each($snoopy->headers))
          echo 
      $key.": ".$val."<br>\n";
      echo 
      "<p>\n";
      echo 
      "<PRE>".($snoopy->results)."</PRE>\n"
      ich bekomme dann folgende fehlermeldung:

      Error! [ Error 404/500 ]The called document could not be found on this network or caused an unexpected error. Please go back and repeat your inquiry or select a function from the navigation menu.
      Header werden folgende zurückgegeben:
      0: HTTP/1.1 200 OK
      1: Date: Mon, 28 Mar 2005 20:12:06 GMT
      2: Server: Apache
      3: Connection: close
      4: Content-Type: text/html
      [COLOR=darkblue].: 1+1=23 :.[/COLOR]

      Kommentar

      Lädt...
      X