Sign in Join
Wiki copytemporary

Revision 1 of 1, by Trev on 8-10-2020. The page as it is now.

QOTD

Summary

History

A wiki article about QOTD

Accessing a QOTD server with Lazarus

pascal
procedure DisplayQOTD;
Var 
MyClient:TTelnetSend;
szQuote:String;

begin
MyClient := TTelNetSend.Create;
With MyClient do
begin
  TargetPort := '17';
  Timeout:=3000;
  TargetHost := 'alpha.mike-r.com';
end;
If MyClient.Login then
  begin
       szQuote := MyClient.RecvString;
       If szQuote = '' then
       begin
          MyClient.Send(LineEnding + LineEnding);
          szQuote := MyClient.RecvString;
       end;
  end
  else szQuote:='Could not retrieve quote';

MyClient.Logout;
ShowMessage(szQuote);
FreeAndNil(MyClient.);
end;

QOTD Servers

Here are some public QOTD servers:

Windows users can install the 'Simple TCPIP services' and activate the Windows built-in QOTD server (localhost)


From the Free Pascal wiki, page "QOTD", as it stood on 2020-08-10 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.