🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: be.comp.programming
Article #1146

Re: via batchbestand html request uitvoeren of telnet aansturen

#1146
From: Dasdan
Date: Tue, 01 Nov 2005 12:30
45 lines
2412 bytes
> Ik ben momenteel op zoek naar een methode om uit een txt bestand de laatste 
> regel tekst uit te lezen en deze weg te schrijven naar een telnetsessie of 
> een html request doen met die tekst.
>
> Het doen van die html request lukt al:
> "C:\Program Files\Internet Explorer\IEXPLORE.EXE" 
> "localhost/cmd.html?cmd=announce&sc=2&txt=testtekst"
> of
> "C:\Program Files\Mozilla Firefox\firefox.exe" 
> "localhost/cmd.html?cmd=announce&sc=2&txt=testtekst"
>
> Maar gaat telkens een nieuwe browser starten...
>
> Iemand een alternatief?
> (behalve pskill iexplore.exe)

zoals je zelf al aangaf kan je dit ook met telnet

telnet www.dasdan.be 80

misschien moet je eens aan php denken? kan je heel makkelijk files en 
sockets mee aansturen , bijvoorbeeld :

<?php
$http_response = '';
$fp = fsockopen('www.dasdan.be', 80);
fputs($fp, "GET / HTTP/1.1\r\n");
fputs($fp, "Host: www.dasdan.be\r\n\r\n");
while (!feof($fp))
{
$http_response .= fgets($fp, 128);
}
fclose($fp);
echo nl2br(htmlentities($http_response));
?>





-- 

Kevin Wood AKA Dasdan
http://www.dasdan.be
http://gratis.host4all.be    gratis mailbox
Technical Details
Message-ID: <mn.0b2a7d5bfe52653a.41130@hotmail.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!hwmnpeer01.ams!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
References: <0Bu8f.34066$mJ4.1557571@phobos.telenet-ops.be>

Show Full Headers
Complete Article Headers
X-Google-Thread: fcea4,ee2ecb043c0c1b72
X-Google-Attributes: gidfcea4,public
X-Google-Language: DUTCH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.icl.net!newsfeed.fjserv.net!news.tele.dk!news.tele.dk!small.news.tele.dk!news.astraweb.com!newsrouter-eu.astraweb.com!hwmnpeer01.ams!nntp.telenet.be!kwabbernoot.telenet-ops.be!phobos.telenet-ops.be.POSTED!not-for-mail
Subject: Re: via batchbestand html request uitvoeren of telnet aansturen
From: "Dasdan" <dasdan20_antispam@hotmail.com>
References: <0Bu8f.34066$mJ4.1557571@phobos.telenet-ops.be>
Newsgroups: be.comp.programming
Message-ID: <mn.0b2a7d5bfe52653a.41130@hotmail.com>
Organization: www.dasdan.be
X-Newsreader: MesNews/1.04.00.00-nl
MIME-Version: 1.0
Content-Type: text/plain; format=flowed
Content-Transfer-Encoding: 8bit
X-Antivirus: avast! (VPS 0544-0, 31/10/2005), Outbound message
X-Antivirus-Status: Clean
Lines: 47
Date: Tue, 01 Nov 2005 12:30:25 GMT
NNTP-Posting-Host: 81.165.73.144
X-Complaints-To: abuse@telenet.be
X-Trace: phobos.telenet-ops.be 1130848225 81.165.73.144 (Tue, 01 Nov 2005 13:30:25 MET)
NNTP-Posting-Date: Tue, 01 Nov 2005 13:30:25 MET