Are we connected to the Internet?
Here's how to check whether you are connected to the Internet.
Here's how to check whether you are connected to the Internet.
Here's how to obtain all image links from an HTML document.The GetImageLinks procedure fills a TStrings object with the value of the SRC property of the IMG HTML element.Note: if the images have relative links,you will have to parse the document url and pr...
To show a list of all mapped network drives,use the GetNetworkDriveMappings function.Example usage: .
Here's how to change the home page for the IE from Delphi code (IE-Tools-Internet options.) .
The GetIEFavourites function called from the OnClick event of a button returns a list of all the favorites from your Internet Explorer in a ListBox.
If you need to save the contents of a specified URL to a file - and be able to track the download progress,use the TDownLoadURL.While TDownLoadURL is writing to the specified file,it periodically generates an OnDownloadProgress event,so that you can provid...
When optimizing the performance of web servers and ensuring secure data transmission, two technologies often come into play: sendfile and Kernel TLS (kTLS). Both are designed to enhance efficiency in different ways, primarily in the context of sending data...
Creating a dynamic DNS (Domain Name System) service in Python involves several components: a server that listens for DNS queries, a database to store mappings between domain names and IP addresses, and functionality to update these mappings dynamically. Be...
Creating a full-fledged DNS server in PHP is not recommended for production environments due to performance and security concerns. DNS servers require low-level networking capabilities and efficient handling of DNS protocol messages, which PHP is not optim...
Supporting AAAA records, which are used for IPv6 addresses, is a straightforward extension of the previous examples. The AAAA record type is essential for modern applications that operate over IPv6 networks. Here's how you can modify the existing Python DN...
Flask allows you to render HTML templates using the Jinja2 templating engine. Step 1: Create HTML Templates.First,create a directory named templates in the same directory as your app.py file.Inside the templates directory,create an HTML file (e.g.index.htm...
Flask is a feature in the Flask web framework (a popular micro web framework for Python).Flask-Flash is used to display flash messages to users.Flash messages are typically used to provide feedback to users,such as notifications about the success or failur...
Below is a basic Delphi code example to implement a DNS server capable of handling A, AAAA, CNAME, and TXT records with Time-To-Live (TTL) support. This example uses the IdUDPServer component from Indy (Internet Direct) library for handling UDP packets.Thi...
To send content using the POST method in Delphi, you can use the TIdHTTP component from the Indy library, which is a popular library for internet components in Delphi. Below is an example Delphi code snippet demonstrating how to send content using the POST...
In most cases,the Dynamic Host Configuration Protocol (DHCP) automatically configures your system to use the IP addresses of your ISP's domain name servers.To use Public DNS,you need to explicitly change the DNS settings in your operating system or device ...
On Centos 6.7,you can check IP address configuration by ifconfig command as below: .The below is the example of files on " / etc / sysconfig / network-scripts". Among above,ifcfg-eth0 and ifcfg-eth1 is wired network,and below is the reference example: .If ...
Delphi provides function for directory(folder) selection as following. The above function is tested on Delphi 2009,but UI is more like windows 3.1.So I recommend you to use below function which calls shell API on Microsoft Windows System.
This function we show below receives as parameters a file specification (like for example 'C: mp*.tmp' or 'C:*' if you want to search the entire hard disk.) and optionally a set of attributes (exactly as Delphi's FindFirst function),and it returs a StringL...
The BlockInput API function blocks keyboard and mouse input events from reaching applications.Place a Button (name: "Button1") on a form (name: "Form1") and use this code for the button's OnClick event handler.Once you click the button your mouse and keybo...
The following example lists all files and subdirectories of the C:Windows directory into a TListBox called ListBox1:Usage:Followings are the source code for FindAll procedure.
By using the SHBrowseForFolder Windows API function and Delphi we can invoke a Windows system dialog used to browse for files and folders on users hard drive as well as network computers and printers. First,let's look at what SHBrowseForFolder needs.Here's...