Programming.zip

Building a Simple DNS Server in Delphi with TTL Support

676

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...

Mastering Excel Data Importation in PHP

553

You may use an Excel spreadsheet to manage your data for many cases, and had some chances that you want to use it as a direct data source from time to time.You can use PHP libraries like PHPExcel or PhpSpreadsheet to handle Excel files with multiple sheets...

Building a Basic DNS Server in PHP/Python: A Beginner's Guide

731

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...

Dynamic DNS Made Easy: Building a Python-Based Solution

793

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...

Exploring the Depths of Data Transfer: sendfile vs. kTLS

Exploring the Depths of Data Transfer: sendfile vs. kTLS

1,314

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...

Public DNS (Domain Name Service) based on IPv4, IPv6 widely used

Public DNS (Domain Name Service) based on IPv4, IPv6 widely used

1,239

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 ...

Configuring IP Address on Centos 6.7

783

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 ...

PHP form handling example in single page

412

This example shows a very simple form together with the form handling process on a single page. Below is another approach based on Heredoc I like:

How to get Referral URL ?

2,068

Grabs the referring URL - get the HTTP_REFERER and save it to a variable. code snippet: .While not inherently intended for API security,the HTTP_REFERER header can be a valuable tool for implementing an API that restricts access to certain resources based ...

How to convert formatted date time string to datetime?

443

Whatever the formatted string is,strtotime() function convert the formatted date time string to datetime.Following example shows the simple reference can convert date time string whatever the formatted input is.

Retrieving all image links from an HTML document

416

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...

List All Network Drives

389

To show a list of all mapped network drives,use the GetNetworkDriveMappings function.Example usage: .

How to get get IE favorites

448

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.

Download a file from the Internet with progress indicator

550

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...

Adding and Subtracting Time

553

The time () function generates a long string of numbers representing how many seconds have passed since January 1, 1970. It is possible to add and subtract time by adding and subtracting seconds.

The three simplest regular expressions you will use in PHP

580

The three most basic searches using regular expressions are searching for the strings start, the strings end, or for characters it contains. We can do these using the following symbols:^ indicates the string starts with the specified characters, so "^strcp...

Number Format

481

In this article we'll make number format like 0001, 0002, 0003 in stead of 1, 2 ,3. It's very easy to do this for your counter, category or product ID. etc.

A Function Returns Large Random Numbers

425

This basically randomly pick a number between the min and max values. This is made because the rand() and mt_rand() function can not accept numbers larger than 2^31 or 2^63,depend on your processor and complier.

Function AccountCryptPassword($password,$salt)

724

Encryption and password account accessFunction AccountCryptPassword($password,$salt) {  if($salt=="")  {   srand(time());   $random=rand();   $itoa64=". / 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; ...

Cardinal Endings

490

This php based script will find numbers and give them a cardinal ending.This can be useful for displaying rankings or results of a competition.The script is easy to install and use .Explanation::addOrdinalSuffix($number): This function adds the appropriate...

URL Rewriter PHP

612

URL Rewriter PHP is a short code that can be used to rewrite dynamic PHP urls as URL's that link to static htmlpages.Increases search engine rankings by creating a static system of page linking as well as making all content available. Associated Data for U...

Browser detection in PHP

735

Sometimes, you may want to know what kind of browser is connecting to your web site. Actually such kind of information is usually stored in $_SERVER.  Below is the reference: