Re: Winsock CGI

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Andreas Born (Andreas.Born_at_gmx.de)
Date: 04/27/04


Date: Tue, 27 Apr 2004 12:59:32 +0200

Hallo Jan,

> man mus die einzelnen Felder im Gästebuchformular alle in eine
> Variable schreiben, und alle felder da ranhängen.

Nicht nur. Man muß diese auch kodieren. Überlege mal was passiert, wenn
in dem zu sendenden Text ein "&" oder "=" -Zeichen vorkommt.

> Dann kommt dabei sowas herraus.
> http://385276.guestbook.onetwomax.de/?id=385276&nc=1&name=TestUser
> &email=123@yahoo.de&homepage=http://www.123.de&herkunft=Deutschland
> &kommentar=eintest&eintragen=Eintragen
>
> Und wenn man da sganze dann im Internet Explorer eintippt kann man das
> tatsächlich abschicken.

Das zeigt dann nur, daß das Gästebuchformular nicht sauber programmiert
wurde.

Schau Dir mal den HTML-Quelltext des Formulars an. Dort steht bestimmt
"Method=POST". Also benutze doch einfach POST.

> Kann man das so wie hier aufgebaut ist nihct einfach mit Winsock
> abschikcen und einfach die Rückmeldung falls da eine kommt auswerten.
> ?

Nein. Webserver sprechen HTTP. Wenn Du vom Webserver eine Aktion
erwartest, mußt Du auch HTTP sprechen. Das Winsock-Control spricht aber
nur TCP.

Was Du zum Server schicken mußt, damit das ganze funktioniert, habe ich
Dir doch im letzten Posting schon aufgezeigt. Der Code ist eigentlich
komplett.

Alternativ bleiben Dir noch die Möglichkeiten, das ganze wie von
Sebastian vorgeschlagen über das Inet-Control zu machen (welches auch
HTTP "spricht"), oder dem Webbrowser-Control (welches ja quasi der
Internetexplorer selbst ist, und dir den Zugriff auf das entsprechende
Formular ermöglicht.

Viele Grüße,
Andreas



Relevant Pages

  • Re: Only can connect to secure sites
    ... I want to add that I don't know if you did much tweaking to Internet ... would cause problem for any http sites entered there. ... You might try posting on one of the Internet Explorer newsgroups ... > <Dale C Brodin> wrote in message ...
    (comp.security.firewalls)
  • Http 1.1 Settings
    ... One setting that appears to effect this behavior is the http 1.1 ... settings in internet explorer. ...
    (microsoft.public.isa)
  • cannot display page in ie
    ... i get connected to the internet with a dial up - internet ... message - http 404 file not found internet explorer - ... no return with 4 packets lost - i am lost - any answers ...
    (microsoft.public.windowsxp.general)
  • Re: Public Website on SBS 2003
    ... hosting and PROTECTING a website is specialist field and ... As leythos says you need to open HTTP port to the www. ... network settings are on servers internet connections. ...
    (microsoft.public.windows.server.sbs)
  • Re: Internet syncronisation failed after installing security update
    ... which one is responsible) iis is ignoring the PUT-command via http. ... messing up the access replication. ... but the base problem is the same: "internet ...
    (microsoft.public.access.replication)