﻿<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="https://www.w3.org/2005/Atom">
  <channel>
    <title>Newest KB Articles in Tutorials</title>
    <description>Recent additions to the knowledge base from Clever Components</description>
    <link>http://portal.clevercomponents.com/kb/c5/tutorials.aspx</link>
    <pubDate>Tue, 09 Jun 2026 23:22:00 GMT</pubDate>
    <generator>SmarterTrack Free 100.0.9371</generator>
    <atom:link href="http://portal.clevercomponents.com/RSS.ashx?catid=5&amp;type=newestkbarticles" rel="self" type="application/rss+xml" />
    <item>
      <title>SFTP Client with Host-key Repository</title>
      <link>http://portal.clevercomponents.com/kb/a191/sftp-client-with-host-key-repository.aspx</link>
      <pubDate>Tue, 26 Apr 2022 15:47:01 GMT</pubDate>
      <guid isPermaLink="false">kbarticle191</guid>
      <description>&lt;div&gt;This Delphi app implements a simple host key repository that keeps all known and verified by user SFTP host-keys and automatically accepts connections to these hosts.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/SFtpClientWithHostKeyRepository/sftp-hostkey-repo.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/SFtpClientWithHostKeyRepository" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The &lt;a href="https://www.clevercomponents.com/products/inetsuite/sftpclient.asp" target="_blank"&gt;SFTP Component&lt;/a&gt; provides all necessary remote host information through the OnVerifyServer event: host name, key type, finger-print, and host-key bytes. You can save this information, e.g. as a string to the TStringList object in your program. This allows you to easily save the string list content to the disk, and load the list next time you run the app.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The program connects to an SFTP host via the Secure Shell protocol (SSH), authorizes with the user/password or the Public Key algorithms, lists, downloads, and uploads files.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;This program is mostly a simple demos, and by no means, a complete application. You are free to use it as a starting point to develop your own functionality.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also: &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Examples/tree/master/Delphi/SFtpClient" target="_blank"&gt;SFTP Client&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;How to compile:&lt;/div&gt;

&lt;div&gt;
&lt;ol&gt;
	&lt;li&gt;Please clone the &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials" target="_blank"&gt;GitHub/CleverComponents/Clever-Internet-Suite-Tutorials&lt;/a&gt; repository.&lt;/li&gt;
	&lt;li&gt;Download and install the &lt;a href="https://www.clevercomponents.com/downloads/inetsuite/suitedownload.asp" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library.&lt;/li&gt;
	&lt;li&gt;Open and compile the SFtpClientHostKey.dproj project in your Delphi IDE.&lt;/li&gt;
	&lt;li&gt;Enjoy.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Please feel free to &lt;a href="https://www.clevercomponents.com/support/" target="_blank"&gt;Contact Us&lt;/a&gt; and ask any program related questions.&lt;/div&gt;

&lt;div&gt;Keep updated on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to Override Default POP3 Server Command Handlers</title>
      <link>http://portal.clevercomponents.com/kb/a190/how-to-override-default-pop3-server-command-handlers.aspx</link>
      <pubDate>Mon, 18 Apr 2022 20:43:31 GMT</pubDate>
      <guid isPermaLink="false">kbarticle190</guid>
      <description>&lt;div&gt;The program provides a Delphi tutorial that utilizes the Clever POP3 Server component together with the POP3 File Handler component to deliver Emails to clients from your own application.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/Pop3ServerCmdOverride/pop3-server-cmd-ovr.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/Pop3ServerCmdOverride/" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The &lt;a href="https://www.clevercomponents.com/products/inetsuite/popserver.asp" target="_blank"&gt;TclPop3Server&lt;/a&gt; component represents a fully functional multithreaded server with the ability to customize the user and thread performance settings. The server supports all POP3 extensions, according to the RFC 1939, RFC 1734, and RFC 2449 protocols.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The other component, TclPop3FileHandler, implements the file-based storage for the user mailboxes and messages on the disk.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The given example shows how to override the default POP3 command handlers and implement your own ones. Please check out the STAT and the LIST overrides. Comments within the source code will help you to understand how the code works.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;This program is mostly a simple demos, and by no means, a complete application. It has one predefined user, &amp;quot;CleverTester&amp;quot;, with the password &amp;quot;clevertester&amp;quot;. You are free to add any number of desired users using the TclPop3Server.UserAccounts property. The server supports both the POP and SASL authorization methods: LOGIN, CRAM-MD5, NTLM, and Kerberos.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also: &lt;a href="https://github.com/CleverComponents/Clever-Mail-Server" target="_blank"&gt;Clever Mail Server&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;How to compile:&lt;/div&gt;

&lt;div&gt;
&lt;ol&gt;
	&lt;li&gt;Please clone the &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials" target="_blank"&gt;GitHub/CleverComponents/Clever-Internet-Suite-Tutorials&lt;/a&gt; repository.&lt;/li&gt;
	&lt;li&gt;Download and install the &lt;a href="https://www.clevercomponents.com/downloads/inetsuite/suitedownload.asp" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library.&lt;/li&gt;
	&lt;li&gt;Open and compile the Pop3ServerCmdOverride.dproj project in your Delphi IDE.&lt;/li&gt;
	&lt;li&gt;Enjoy.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Please feel free to &lt;a href="https://www.clevercomponents.com/support/" target="_blank"&gt;Contact Us&lt;/a&gt; and ask any program related questions.&lt;/div&gt;

&lt;div&gt;Keep updated on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Send Photo using Telegram Bot API</title>
      <link>http://portal.clevercomponents.com/kb/a189/send-photo-using-telegram-bot-api.aspx</link>
      <pubDate>Mon, 11 Apr 2022 09:41:21 GMT</pubDate>
      <guid isPermaLink="false">kbarticle189</guid>
      <description>&lt;div&gt;The program represents a Delphi tutorial that utilizes the Clever HTTP and HttpRequest components to submit an image to a Telegram channel using &lt;a href="https://core.telegram.org/bots/api" target="_blank"&gt;Telegram Bot API&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/SendTelegramPhoto/send-tel-photo.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/SendTelegramPhoto/" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;This Delphi program represents a mostly simple demos and by no means, a complete application. It's intended to demonstrate how to use the &lt;a href="https://www.clevercomponents.com/products/inetsuite/httpclient.asp" target="_blank"&gt;HTTP Client&lt;/a&gt; together with the &lt;a href="https://www.clevercomponents.com/products/inetsuite/requestbuilder.asp" target="_blank"&gt;HTTP Request&lt;/a&gt; component in your Delphi application.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The program allows you to load an image using the TImage VCL component, save the image source in to a stream, and substitute the derived stream to the REST API request using the OnLoadData event of the HTTP Request component.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The Clever HTTP components completely support SSL/TLS, custom HTTP headers, Form Field, JSON, and SOAP requests. The following example shows how to send JSON data to a REST service: &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/RestClientSendReceiveJson" target="_blank"&gt;How to write a REST client with JSON in Delphi&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also: &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/RestSoapSignEncrypt" target="_blank"&gt;Delphi REST SOAP Client with WSS Signatures and Encryption&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;How to compile:&lt;/div&gt;

&lt;div&gt;
&lt;ol&gt;
	&lt;li&gt;Please clone the &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials" target="_blank"&gt;GitHub/CleverComponents/Clever-Internet-Suite-Tutorials&lt;/a&gt; repository.&lt;/li&gt;
	&lt;li&gt;Download and install the &lt;a href="https://www.clevercomponents.com/downloads/inetsuite/suitedownload.asp" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library.&lt;/li&gt;
	&lt;li&gt;Open and compile the SendTelegramPhoto.dproj project in your Delphi IDE.&lt;/li&gt;
	&lt;li&gt;Enjoy.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Please feel free to &lt;a href="https://www.clevercomponents.com/support/" target="_blank"&gt;Contact Us&lt;/a&gt; and ask any program related questions.&lt;/div&gt;

&lt;div&gt;Keep updated on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to Recompose Received MailMessage with Attachments</title>
      <link>http://portal.clevercomponents.com/kb/a188/how-to-recompose-received-mailmessage-with-attachments.aspx</link>
      <pubDate>Mon, 11 Apr 2022 09:29:43 GMT</pubDate>
      <guid isPermaLink="false">kbarticle188</guid>
      <description>&lt;div&gt;The program represents a Delphi tutorial that utilizes the Clever Mail Message and S/MIME Message components to parse / compose E-mail messages in MIME format, with file or image attachments.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/RecomposeMailMessage/recompose-mail-message.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/RecomposeMailMessage/" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;When using the &lt;a href="https://www.clevercomponents.com/products/inetsuite/messageparser.asp" target="_blank"&gt;TclMailMessage&lt;/a&gt; component together with the POP3 or IMAP4 clients, the message parts are extracted and saved to the MailMessage members. If you save the message source with the TclMailMessage.SaveMessage method or access the message source via the TclMailMessage.MessageSource property, the message is recomposed. Since the attachmets are not stored in memory, the component raises the OnLoadAttachment event in order to get a stream with the attachment content. As a result, you will not get the original message content. If you want to get the origital source of the received message, please use the TclPop3.Response (TclImap4.Response) property instead. Otherwise, you will have to implement both the TclMailMessage.OnSaveAttachment and TclMailMessage.OnLoadAttachment event handers. This is necessary to save emails with attachments, and the given program shows you how to do this.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The other component, &lt;a href="https://www.clevercomponents.com/products/inetsuite/smimeparser.asp" target="_blank"&gt;TclSMimeMessage&lt;/a&gt;, represents the TclMailMessage descendant and provides an additional functionality to encrypt/decrypt and sign/verify the message using the S/MIME standard.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The given program utilizes both these components and additionally allows saving digitally verified message source. Comments within the source code will help you to understand how the code works.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Using this tutorial as a starting point, you can implement your own storage for the attached files and images, including database tables and in-memory streams.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also:&lt;/div&gt;

&lt;div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="https://www.clevercomponents.com/portal/kb/a33/saving-mail-attachments.aspx"&gt;Saving mail attachments&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://www.clevercomponents.com/portal/kb/a121/sending-mail-with-attachments-from-memory-stream.aspx"&gt;Sending Mail with Attachments from Memory Stream&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://www.clevercomponents.com/portal/kb/a124/adding-text-and-attachments-to-the-e-mail-message.aspx"&gt;Adding text and attachments to the E-mail message&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;How to compile:&lt;/div&gt;

&lt;div&gt;
&lt;ol&gt;
	&lt;li&gt;Please clone the &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials" target="_blank"&gt;GitHub/CleverComponents/Clever-Internet-Suite-Tutorials&lt;/a&gt; repository.&lt;/li&gt;
	&lt;li&gt;Download and install the &lt;a href="https://www.clevercomponents.com/downloads/inetsuite/suitedownload.asp" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library.&lt;/li&gt;
	&lt;li&gt;Open and compile the RecomposeMailMessage.dproj project in your Delphi IDE.&lt;/li&gt;
	&lt;li&gt;Enjoy.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Please feel free to &lt;a href="https://www.clevercomponents.com/support/" target="_blank"&gt;Contact Us&lt;/a&gt; and ask any program related questions.&lt;/div&gt;

&lt;div&gt;Keep updated on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Silent Socket Receiver in Delphi</title>
      <link>http://portal.clevercomponents.com/kb/a180/silent-socket-receiver-in-delphi.aspx</link>
      <pubDate>Wed, 26 Jan 2022 11:14:43 GMT</pubDate>
      <guid isPermaLink="false">kbarticle180</guid>
      <description>&lt;div&gt;The tutorial represents a Delphi program that starts listening to an incoming connection, accepts the connection, receives all data over the established connection, and sends no data back to the client.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/SilentSocketReceiver/silent-socket.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/SilentSocketReceiver" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;This Delphi program represents a mostly simple demos and by no means, a complete application. It's intended to demonstrate how to use the TcpServerConnection socket class from the &lt;a href="https://www.clevercomponents.com/products/inetsuite/" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library to start listening on the specified local port and receive TCP packets over the Network.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;This functionality might be useful when you debug a Network app and want to analyze the produced TCP traffic. You can run the Silent Socket Receiver app and capture the Network packets between the client and the server, e.g. using the &lt;a href="https://www.wireshark.org/download.html" target="_blank"&gt;Wireshark&lt;/a&gt; utility. In this case your Network app acts as the client, and the Silent Socket Receiver app as the server.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;You can even modify the Silent Socket Receiver program to send TCP response back to the connected client.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="background: rgb(255, 255, 255); color: rgb(0, 0, 0);"&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;procedure&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;FormCreate&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;Sender&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TObject&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  StartupSocket&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  FConnection &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclTcpServerConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Create&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;procedure&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;FormDestroy&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;Sender&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TObject&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  FConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Free&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  CleanupSocket&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;
&lt;pre style="background: rgb(255, 255, 255); color: rgb(0, 0, 0);"&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;procedure&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;btnListenClick&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;Sender&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TObject&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;var&lt;/span&gt;
  data&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TStream&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;try&lt;/span&gt;
    FConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;NetworkStream &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclNetworkStream&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Create&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    FConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Listen&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;StrToInt&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;edtPort&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Text&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    memLog&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Lines&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Add&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'=== Start listening ==='&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    FStarted &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128); font-weight: bold;"&gt;True&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    FConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;TimeOut &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;-&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    FConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Accept&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    data &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TMemoryStream&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Create&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;try&lt;/span&gt;
      &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;repeat&lt;/span&gt;
        FConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ReadData&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;data&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
        memLog&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Lines&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Add&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'Received bytes: '&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; IntToStr&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;data&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Size&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
        Application&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ProcessMessages&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
        data&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Size &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
      &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;until&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;not&lt;/span&gt; FConnection&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Active&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;finally&lt;/span&gt;
      data&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Free&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;except&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;on&lt;/span&gt; E&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; EclSocketError &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;do&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
      &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;E&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ErrorCode &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;10053&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;and&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;E&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ErrorCode &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;10038&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;then&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;raise&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also:&lt;/div&gt;

&lt;div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/CustomSocket" target="_blank"&gt;TCP client / server connection&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://www.clevercomponents.com/portal/kb/a96/read-a-fixed-number-of-bytes-from-the-socket-using-tcpclientconnection.aspx"&gt;Read a fixed number of bytes from the socket using TcpClientConnection&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;How to compile:&lt;/div&gt;

&lt;div&gt;
&lt;ol&gt;
	&lt;li&gt;Please clone the &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials" target="_blank"&gt;GitHub/CleverComponents/Clever-Internet-Suite-Tutorials&lt;/a&gt; repository.&lt;/li&gt;
	&lt;li&gt;Download and install the &lt;a href="https://www.clevercomponents.com/downloads/inetsuite/suitedownload.asp" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library.&lt;/li&gt;
	&lt;li&gt;Open and compile the SilentSocketReceiver project in your Delphi IDE.&lt;/li&gt;
	&lt;li&gt;Enjoy.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Have questions?&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Please feel free to &lt;a href="https://www.clevercomponents.com/support/" target="_blank"&gt;Contact Us&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;Join us on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Mail Send with TMS FNC RichEditor</title>
      <link>http://portal.clevercomponents.com/kb/a178/mail-send-with-tms-fnc-richeditor.aspx</link>
      <pubDate>Tue, 14 Dec 2021 17:18:15 GMT</pubDate>
      <guid isPermaLink="false">kbarticle178</guid>
      <description>&lt;div&gt;The program represents a Delphi tutorial that utilizes the TMS FNC UI RichEditor and Clever SMTP components to compose and send HTML E-mails.&lt;/div&gt;

&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/MailSend-TMS-RichEditor/mailsend-tms-richedit.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/edit/master/vcl/MailSend-TMS-RichEditor/" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;This Delphi program represents a mostly simple demos and by no means, a complete application. It's intended to demonstrate how to use the &lt;a href="https://www.clevercomponents.com/products/inetsuite/smtp.asp" target="_blank"&gt;SMTP&lt;/a&gt; component together with the &lt;a href="https://www.tmssoftware.com/site/tmsfncuipack.asp?s=fncricheditor#features" target="_blank"&gt;TMS FNC UI RichEditor&lt;/a&gt; in your Delphi application. Additionally, the program uses the &lt;a href="https://www.clevercomponents.com/products/inetsuite/messageparser.asp" target="_blank"&gt;MailMessage&lt;/a&gt; component, which allows you to create E-mails in the MIME format, including message headers, text- and HTML bodies, file attachments, and embedded images. The &lt;a href="https://www.clevercomponents.com/products/inetsuite/htmlparser.asp" target="_blank"&gt;HtmlParser&lt;/a&gt; component parses the HTML content, extracts embedded images, and produces a text-plain representation of the HTML message body.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The program allows you to authenticate using the username/password information. Also the SMTP component supports the OAUTH2.0, Digest, NTLM, and other SASL authentication methods. The SMTP client component completely supports the SSL/TLS mode, including the client certificate authorization and the server validation process.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also:&lt;/div&gt;

&lt;div&gt;
&lt;ul&gt;
	&lt;li&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Examples/tree/master/Delphi/GMailSMTP" target="_blank"&gt;GMail SMTP Client&lt;/a&gt;&lt;/li&gt;
	&lt;li&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Examples/tree/master/Delphi/SmtpClientSSL" target="_blank"&gt;SMTP Client SSL&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;How to compile:&lt;/div&gt;

&lt;div&gt;
&lt;ol&gt;
	&lt;li&gt;Please clone the &lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials" target="_blank"&gt;GitHub/CleverComponents/Clever-Internet-Suite-Tutorials&lt;/a&gt; repository.&lt;/li&gt;
	&lt;li&gt;Download and install the &lt;a href="https://www.clevercomponents.com/downloads/inetsuite/suitedownload.asp" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library.&lt;/li&gt;
	&lt;li&gt;Download and install the &lt;a href="https://www.tmssoftware.com/site/tmsfncuipack.asp" target="_blank"&gt;TMS FNC UI Pack&lt;/a&gt; library.&lt;/li&gt;
	&lt;li&gt;Open and compile the MailSendTMSRichEditor project in your Delphi IDE.&lt;/li&gt;
	&lt;li&gt;Enjoy.&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Have questions?&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Please feel free to &lt;a href="https://www.clevercomponents.com/support/" target="_blank"&gt;Contact Us&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;Join us on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Connect Bitstamp API from Delphi</title>
      <link>http://portal.clevercomponents.com/kb/a176/connect-bitstamp-api-from-delphi.aspx</link>
      <pubDate>Wed, 13 Oct 2021 08:11:02 GMT</pubDate>
      <guid isPermaLink="false">kbarticle176</guid>
      <description>&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/BitstampAPI/bitstamp-api.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/BitstampAPI" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;This program represents a converted C++ example, which is published in the Bitstamp API documentation. The example shows how to authenticate at the Bitstamp REST service, fill necessary request fields, and make an API call.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also:&lt;/div&gt;

&lt;div&gt;&lt;a href="https://www.clevercomponents.com/portal/kb/a135/how-to-write-a-rest-client-with-json-in-delphi.aspx"&gt;How to write a REST client with JSON in Delphi&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="background: rgb(255, 255, 255); color: rgb(0, 0, 0);"&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;const&lt;/span&gt;
  api_key &lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'api_key'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  api_secret &lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'api_key_secret'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;function&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GenerateNonce&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Result&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TGuid&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;NewGuid&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ToString&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ToLower&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Trim&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'{'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'}'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;function&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GenerateTimestamp&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;var&lt;/span&gt;
  time_since_epoch&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Comp&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  time_since_epoch &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TimeStampToMSecs&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;DateTimeToTimeStamp&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;LocalTimeToGlobalTime&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;Now&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;-&lt;/span&gt; TimeStampToMSecs&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;DateTimeToTimeStamp&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;EncodeDate&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;1970&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;1&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Result&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; FloatToStr&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;time_since_epoch&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;function&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GetPayload&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;const&lt;/span&gt; ARequestData&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Result&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclFormFieldEncoder&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Encode&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;ARequestData&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;function&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GetSignature&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;const&lt;/span&gt; ADataToSign&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;var&lt;/span&gt;
  hash&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TclHmacSha256&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  key&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; data&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TBytes&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  hash &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclHmacSha256&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Create&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;try&lt;/span&gt;
    key &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclTranslator&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GetBytes&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;api_secret&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclTranslator&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GetBytes&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;ADataToSign&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    hash&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Init&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;key&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; Length&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;key&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    hash&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Update&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;data&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; Length&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;data&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Result&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; BytesToHex&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;hash&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Digest&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ToLower&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;finally&lt;/span&gt;
    hash&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Free&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;procedure&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;btnSubmitClick&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;Sender&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TObject&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;var&lt;/span&gt;
  x_auth&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  x_auth_nonce&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  x_auth_timestamp&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  x_auth_version&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  content_type&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  payload&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  http_method&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  url_host&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  url_path&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  url_query&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt;
  x_auth_signature&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TStringBuilder&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  url&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; response&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  &lt;span style="color: rgb(0, 128, 0);"&gt;//http.ProxySettings.Server := '20.81.62.32';&lt;/span&gt;
  &lt;span style="color: rgb(0, 128, 0);"&gt;//http.ProxySettings.Port := 3128;&lt;/span&gt;

  x_auth &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'BITSTAMP '&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; api_key&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  x_auth_nonce &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; GenerateNonce&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  x_auth_timestamp &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; GenerateTimestamp&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  x_auth_version &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'v2'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  content_type &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'application/x-www-form-urlencoded'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  payload &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; GetPayload&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'{offset:1}'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  http_method &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'POST'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  url_host &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'www.bitstamp.net'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  url_path &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'/api/v2/user_transactions/'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  url_query &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  data_to_sign &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TStringBuilder&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Create&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;try&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;x_auth&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;http_method&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;url_host&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;url_path&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;url_query&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;content_type&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;x_auth_nonce&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;x_auth_timestamp&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;x_auth_version&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Append&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;payload&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    x_auth_signature &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; GetSignature&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ToString&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;finally&lt;/span&gt;
    data_to_sign&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Free&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  url &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'https://'&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; url_host &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; url_path &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; url_query&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Clear&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;AddTextData&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;payload&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Accept &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;AcceptEncoding &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;''&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ExtraFields&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Add&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'X-Auth: '&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; x_auth&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ExtraFields&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Add&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'X-Auth-Signature: '&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; x_auth_signature&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ExtraFields&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Add&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'X-Auth-Nonce: '&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; x_auth_nonce&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ExtraFields&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Add&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'X-Auth-Timestamp: '&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; x_auth_timestamp&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ExtraFields&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Add&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'X-Auth-Version: '&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; x_auth_version&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;ContentType &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; content_type&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  http&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;SilentHTTP &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128); font-weight: bold;"&gt;True&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  response &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; http&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Post&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;url&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; request&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  memResponse&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Lines&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Text&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; response&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  ShowMessage&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'Done'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Have questions?&lt;/div&gt;

&lt;div&gt;Join us on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>HttpServer - handling form-field requests</title>
      <link>http://portal.clevercomponents.com/kb/a170/httpserver-handling-form-field-requests.aspx</link>
      <pubDate>Wed, 28 Apr 2021 18:19:18 GMT</pubDate>
      <guid isPermaLink="false">kbarticle170</guid>
      <description>&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/HttpServerFormFieldRequests/HttpServerFormFieldRequests.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/HttpServerFormFieldRequests" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The code below runs the HTTP server, accepts requests from connected users, and sends responses. If the request contains form-field data, the form fields are parsed and extracted.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also:&lt;/div&gt;

&lt;div&gt;&lt;a href="https://www.clevercomponents.com/articles/article050" target="_blank"&gt;Write your own HTTPS Server in Delphi&lt;/a&gt;&lt;br /&gt;
&lt;a href="https://github.com/CleverComponents/Http-Server" target="_blank"&gt;Download HttpServer Component and Demo Program on GitHub&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="background: rgb(255, 255, 255); color: rgb(0, 0, 0);"&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;procedure&lt;/span&gt; TForm1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;clHttpServer1ReceiveRequest&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;Sender&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TObject&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  AConnection&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TclHttpUserConnection&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;const&lt;/span&gt; AMethod&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; AUri&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  AHeader&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TclHttpRequestHeader&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt; ABody&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TStream&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;var&lt;/span&gt;
  request&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TclHttpRequest&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  user&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; password&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; response&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  field&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TclFormFieldRequestItem&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  request &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclHttpRequest&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Create&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 128, 128); font-weight: bold;"&gt;nil&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;try&lt;/span&gt;
    &lt;span style="color: rgb(0, 128, 0);"&gt;//assign the request header&lt;/span&gt;
    request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Header &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; AHeader&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//load and parse the request&lt;/span&gt;
    ABody&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Position &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;RequestStream &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; ABody&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//extract the form fields&lt;/span&gt;
    field &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;FormFields&lt;span style="color: rgb(0, 0, 255);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'username'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;field &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128); font-weight: bold;"&gt;nil&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;then&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
      user &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; field&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;FieldValue&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    field &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;FormFields&lt;span style="color: rgb(0, 0, 255);"&gt;[&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'password'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;]&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;if&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;field &lt;span style="color: rgb(0, 0, 255);"&gt;&amp;lt;&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;&amp;gt;&lt;/span&gt; &lt;span style="color: rgb(128, 128, 128); font-weight: bold;"&gt;nil&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;then&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
      password &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; field&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;FieldValue&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//process the extracted fields and send a response&lt;/span&gt;
    response &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'&amp;lt;html&amp;gt;&amp;lt;body&amp;gt;&amp;lt;p&amp;gt;The user logged in.&amp;lt;/p&amp;gt;&amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
    &lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;Sender &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;as&lt;/span&gt; TclHttpServer&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;SendResponse&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;AConnection&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(128, 0, 0);"&gt;200&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'OK'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; response&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;finally&lt;/span&gt;
    request&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Free&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;</description>
    </item>
    <item>
      <title>How to modify a subject line of the email within the raw .eml source</title>
      <link>http://portal.clevercomponents.com/kb/a169/how-to-modify-a-subject-line-of-the-email-within-the-raw-_eml-source.aspx</link>
      <pubDate>Wed, 28 Apr 2021 17:30:23 GMT</pubDate>
      <guid isPermaLink="false">kbarticle169</guid>
      <description>&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/ModifyRawEmailSource/ModifyRawEmailSource.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/ModifyRawEmailSource" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The code below loads an email message from an .eml file, parses the MIME message header, extracts and replaces the subject line, and finally, sends the message using the SMTP component.&lt;br /&gt;
The other MIME header fields can be modified using the introduced approach.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;See also:&lt;/div&gt;

&lt;div&gt;&lt;a href="https://www.clevercomponents.com/portal/kb/a126/how-to-extract-add-mime-headers-in-e-mail-messages-and-http-requests.aspx"&gt;How to extract/add MIME headers in E-mail messages and HTTP requests&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="background: rgb(255, 255, 255); color: rgb(0, 0, 0);"&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;var&lt;/span&gt;
  fieldList&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; TclMailHeaderFieldList&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  ind&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;Integer&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  subject&lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt; &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;string&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;begin&lt;/span&gt;
  &lt;span style="color: rgb(0, 128, 0);"&gt;//load a message in a raw format.&lt;/span&gt;
  clSmtp1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;MailData&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;LoadFromFile&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'mailmessage.eml'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  &lt;span style="color: rgb(0, 128, 0);"&gt;//set up the TclSmtp component&lt;/span&gt;
  clSmtp1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Server &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'mail.example.com'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  clSmtp1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;UserName &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'user'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  clSmtp1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Password &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;'secret'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  &lt;span style="color: rgb(0, 128, 0);"&gt;//specify the desired character set and MIME encoding for the Subject header field&lt;/span&gt;
  fieldList &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; TclMailHeaderFieldList&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Create&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'utf-8'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; cmQuotedPrintable&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; DefaultCharsPerLine&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;try&lt;/span&gt;
    &lt;span style="color: rgb(0, 128, 0);"&gt;//parse the mail header&lt;/span&gt;
    fieldList&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Parse&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(128, 0, 0);"&gt;0&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; clSmtp1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;MailData&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//get an index of the Subject field&lt;/span&gt;
    ind &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; fieldList&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GetFieldIndex&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'Subject'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//get the Subject field value&lt;/span&gt;
    subject &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; fieldList&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;GetDecodedFieldValue&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;ind&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//modify the subject line&lt;/span&gt;
    subject &lt;span style="color: rgb(0, 0, 255);"&gt;:&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;=&lt;/span&gt; subject &lt;span style="color: rgb(0, 0, 255);"&gt;+&lt;/span&gt; &lt;span style="color: rgb(0, 0, 230);"&gt;' modified...'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//remove the subject field from the clSmtp1.MailData string list&lt;/span&gt;
    fieldList&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;RemoveField&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;ind&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//add an updated subject line&lt;/span&gt;
    fieldList&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;AddEncodedField&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 230);"&gt;'Subject'&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;,&lt;/span&gt; subject&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

    &lt;span style="color: rgb(0, 128, 0);"&gt;//starting from now, the clSmtp1.MailData property contains the updated Subject field&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;finally&lt;/span&gt;
    fieldList&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Free&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
  &lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;

  &lt;span style="color: rgb(0, 128, 0);"&gt;//send the message&lt;/span&gt;
  clSmtp1&lt;span style="color: rgb(0, 0, 255);"&gt;.&lt;/span&gt;Send&lt;span style="color: rgb(0, 0, 255);"&gt;(&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;)&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;span style="color: rgb(0, 0, 255); font-weight: bold;"&gt;end&lt;/span&gt;&lt;span style="color: rgb(0, 0, 255);"&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Have questions?&lt;/div&gt;

&lt;div&gt;Join us on &lt;a href="https://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
    <item>
      <title>Download TS files from video stream</title>
      <link>http://portal.clevercomponents.com/kb/a163/download-ts-files-from-video-stream.aspx</link>
      <pubDate>Tue, 19 May 2020 10:24:07 GMT</pubDate>
      <guid isPermaLink="false">kbarticle163</guid>
      <description>&lt;div&gt;&lt;img alt="" src="https://raw.githubusercontent.com/CleverComponents/Clever-Internet-Suite-Tutorials/master/vcl/VideoTSDownloader/Images/VideoTSDownloader-Form.jpg" /&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The example shows how to download TS files from a video stream using the MultiDownloader component.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;The code utilizes the &lt;a href="https://www.clevercomponents.com/products/inetsuite/" target="_blank"&gt;Clever Internet Suite&lt;/a&gt; library.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;&lt;a href="https://github.com/CleverComponents/Clever-Internet-Suite-Tutorials/tree/master/vcl/VideoTSDownloader" target="_blank"&gt;Download Source Code&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Watch on &lt;a href="https://youtu.be/Ny0_0yARIPg" target="_blanc"&gt;YouTube&lt;/a&gt;&lt;/div&gt;

&lt;h2&gt;The task of downloading and joining TS video streams consists of three steps:&lt;/h2&gt;

&lt;div&gt;1) discover a m3u8 playlist URL, download this URL, and extract all TS file links;&lt;br /&gt;
2) download all extracted TS file links.&lt;br /&gt;
3) prepare config files for the ffmpeg utility.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;You can obtain an m3u8 URL using Firefox with the installed Stream Detector add-on. This add-on allows you to automatically extract all TS video links and copy them to the clipboard.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="color:#000000;background:#ffffff;"&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;procedure&lt;/span&gt; TForm1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;btnGetListClick&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;Sender&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TObject&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;var&lt;/span&gt;
  i&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; counter&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;Integer&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  item&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TclDownLoadItem&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  list&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TStrings&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  urlParser&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TclUrlParser&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  s&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;String&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;if&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;IsBusy&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;then&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
    ShowMessage&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'The downloading is in progress'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    &lt;span style="color:#0000ff; font-weight:bold; "&gt;Exit&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  clDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;URL &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; edtM3U8Url&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  clDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LocalFile &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#0000e6; "&gt;'downloadlist.m3u8'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  clDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LocalFolder &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt;  edtSaveToFolder&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  clDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;ThreadCount &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;1&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  clDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Start&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#808080; font-weight:bold; "&gt;False&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;DownLoadList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Clear&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  list &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt;  TStringList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Create&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  urlParser &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; TclUrlParser&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Create&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;try&lt;/span&gt;
    list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LineBreak &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;#10&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LoadFromFile&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;clDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LocalFile&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

    counter &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;1&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    &lt;span style="color:#0000ff; font-weight:bold; "&gt;for&lt;/span&gt; i &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;0&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;to&lt;/span&gt; list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Count &lt;span style="color:#0000ff; "&gt;-&lt;/span&gt; &lt;span style="color:#800000; "&gt;1&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;do&lt;/span&gt;
    &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
      s &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; list&lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;i&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
      &lt;span style="color:#0000ff; font-weight:bold; "&gt;if&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;s &lt;span style="color:#0000ff; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#0000e6; "&gt;''&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;and&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;s&lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;&lt;span style="color:#800000; "&gt;1&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;&amp;lt;&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#0000e6; "&gt;'#'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;and&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;Pos&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'.ts'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; s&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#800000; "&gt;0&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;then&lt;/span&gt;
      &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
        item &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;DownLoadList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Add&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

        urlParser&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Parse&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;edtM3U8Url&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; s&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
        item&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;URL &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; urlParser&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;AbsoluteUri&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
        item&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LocalFile &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; Format&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'%d.ts'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;counter&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
        Inc&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;counter&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
      &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;finally&lt;/span&gt;
    urlParser&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Free&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Free&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  &lt;span style="color:#0000ff; font-weight:bold; "&gt;if&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;DownLoadList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Count &lt;span style="color:#0000ff; "&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#800000; "&gt;0&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;then&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
    edtProgress&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; Format&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'%d video files found'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;DownLoadList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Count&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;else&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
    ShowMessage&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;
    &lt;span style="color:#0000e6; "&gt;'The provided m3u8 file doesn'&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'t contain video files, please choose another URL.'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="color:#000000;background:#ffffff;"&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;procedure&lt;/span&gt; TForm1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;btnStartClick&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;Sender&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TObject&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;if&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;IsBusy&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;then&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
    ShowMessage&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'The downloading is in progress'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    &lt;span style="color:#0000ff; font-weight:bold; "&gt;Exit&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  memLog&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Lines&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Clear&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  FSuccessful &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;0&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  FFailed &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;0&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;MaxStartedItems &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; StrToInt&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;edtDownloadBy&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;InternetAgent &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; edtUserAgent&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;TryCount &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; StrToInt&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;edtTryCount&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;TimeOut &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; StrToInt&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;edtTimeout&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LocalFolder &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; edtSaveToFolder&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Start&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;

&lt;span style="color:#0000ff; font-weight:bold; "&gt;procedure&lt;/span&gt; TForm1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;btnStopClick&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;Sender&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TObject&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
  clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Stop&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="color:#000000;background:#ffffff;"&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;procedure&lt;/span&gt; TForm1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;clMultiDownLoader1StatusChanged&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;Sender&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TObject&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  Item&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TclInternetItem&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt; Status&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TclProcessStatus&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;case&lt;/span&gt; Status &lt;span style="color:#0000ff; font-weight:bold; "&gt;of&lt;/span&gt;
    psSuccess&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; Inc&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;FSuccessful&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    psFailed&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; psErrors&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; psTerminated&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;
    &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
      Inc&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;FFailed&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
      memLog&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Lines&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Add&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;Item&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;URL&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  edtProgress&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; Format&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'Downloading successful: %d, failed: %d'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;FSuccessful&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; FFailed&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;This program doesn't join downloaded TS files. You can do that using the ffmpeg open-source utility. The program prepares a list of downloaded files to join in one single TS stream file. Optionally, we can re-split this stream on separated parts.&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;
&lt;pre style="color:#000000;background:#ffffff;"&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;procedure&lt;/span&gt; TForm1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;btnPrepareListClick&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;Sender&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TObject&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;var&lt;/span&gt;
  list&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TStrings&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  batch&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;Integer&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  item&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; TclDownLoadItem&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  i&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; counter&lt;span style="color:#0000ff; "&gt;:&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;Integer&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
  list &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; TStringList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Create&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;try&lt;/span&gt;
    batch &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;DownLoadList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Count &lt;span style="color:#0000ff; font-weight:bold; "&gt;div&lt;/span&gt; StrToInt&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;edtSplitOn&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
    counter &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;1&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
     &lt;span style="color:#0000ff; font-weight:bold; "&gt;for&lt;/span&gt; i &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; &lt;span style="color:#800000; "&gt;0&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;to&lt;/span&gt; clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;DownLoadList&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Count &lt;span style="color:#0000ff; "&gt;-&lt;/span&gt; &lt;span style="color:#800000; "&gt;1&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;do&lt;/span&gt;
     &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
        item &lt;span style="color:#0000ff; "&gt;:&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; clMultiDownLoader1&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;DownLoadList&lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;i&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
        list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Add&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'file '&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;''&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;+&lt;/span&gt; ExtractFileName&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;item&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;LocalFile&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;+&lt;/span&gt; &lt;span style="color:#0000e6; "&gt;''&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;''&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
        &lt;span style="color:#0000ff; font-weight:bold; "&gt;if&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Count &lt;span style="color:#0000ff; "&gt;=&lt;/span&gt; batch&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;then&lt;/span&gt;
        &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
          list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;SaveToFile&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;AddTrailingBackSlash&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;edtSaveToFolder&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;+&lt;/span&gt; 
          Format&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'list%d.txt'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;counter&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
          list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Clear&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
          Inc&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;counter&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
        &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
     &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
     &lt;span style="color:#0000ff; font-weight:bold; "&gt;if&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Count &lt;span style="color:#0000ff; "&gt;&amp;gt;&lt;/span&gt; &lt;span style="color:#800000; "&gt;0&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; font-weight:bold; "&gt;then&lt;/span&gt;
     &lt;span style="color:#0000ff; font-weight:bold; "&gt;begin&lt;/span&gt;
        list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;SaveToFile&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;AddTrailingBackSlash&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;edtSaveToFolder&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;&lt;span style="color:#0000ff; font-weight:bold; "&gt;Text&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt; &lt;span style="color:#0000ff; "&gt;+&lt;/span&gt; Format&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'list%d.txt'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;,&lt;/span&gt; 
        &lt;span style="color:#0000ff; "&gt;[&lt;/span&gt;counter&lt;span style="color:#0000ff; "&gt;]&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
     &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;finally&lt;/span&gt;
    list&lt;span style="color:#0000ff; "&gt;.&lt;/span&gt;Free&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  &lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
  ShowMessage&lt;span style="color:#0000ff; "&gt;(&lt;/span&gt;&lt;span style="color:#0000e6; "&gt;'Done'&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;)&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;span style="color:#0000ff; font-weight:bold; "&gt;end&lt;/span&gt;&lt;span style="color:#0000ff; "&gt;;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Have questions?&lt;/div&gt;

&lt;div&gt;Join us &lt;a href="http://www.facebook.com/clevercomponents" target="_blank"&gt;Facebook&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.youtube.com/channel/UC9Si4WNQVSeXQMjdEJ8j1fg" target="_blank"&gt;YouTube&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://twitter.com/CleverComponent" target="_blank"&gt;Twitter&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://t.me/clevercomponents" target="_blank"&gt;Telegram&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;a href="https://www.clevercomponents.com/home/maillist.asp" target="_blank"&gt;Newsletter&lt;/a&gt;&lt;/div&gt;

&lt;div&gt;&amp;nbsp;&lt;/div&gt;

&lt;div&gt;Kind regards&lt;br /&gt;
Clever Components team&lt;br /&gt;
&lt;a href="https://www.clevercomponents.com/" target="_blank"&gt;www.CleverComponents.com&lt;/a&gt;&lt;/div&gt;</description>
    </item>
  </channel>
</rss>