Internet and Protocols: A Blueprint of The Internet System
Internet and Protocols: A Blueprint of The Internet System
First edition
Foreword ix
1 Understanding the Basics of the Internet 1
2 Introduction to Internet Protocols 3
Overview of the Internet Protocol 3
What Are Internet Protocols? 3
A Brief History of Internet Protocols 4
How Internet Protocols Enable Communication 4
Understanding the Internet System 5
How Data is Transmitted Across the Network Using IP Addresses 6
Key Components of the Internet 7
Clients 8
Internet Service Providers (ISPs) 9
Protocols and Their Functionality 10
3 The Transmission Control Protocol (TCP) in Detail 16
Overview of TCP 16
How TCP Works 17
Summary of TCP 20
4 The Internet Protocol (IP) in Detail 22
Overview of IP 22
How IP Works 22
Summary of IP 26
5 How Protocols work 28
HTTP (Hypertext Transfer Protocol) 28
FTP (File Transfer Protocol) 30
SMTP (Simple Mail Transfer Protocol) 32
What is DNS? 34
6 Introduction to Websites 37
1. What Is a Website? 37
2. Domain Names and How They Work 38
3. What Is Web Hosting? 38
4. Web Browsers and Web Servers 39
5. Static vs Dynamic Websites 40
6. A Real-World Example 41
7. URL Parameters and Structured Paths 42
7 Databases, JavaScript, and Dynamic Content 46
What Is a Database? 46
How Dynamic Content Works 47
JavaScript’s Role in Dynamic Sites 48
URL Structures for Pages and Categories 48
In Summary: 49
8 Understanding Domains & URLs 50
What Is a Domain Name? 50
What Is a URL? 51
Routing and URL Paths 52
Why URL Structure Matters 54
9 The Domain Name System (DNS) and Nameservers 55
What Is DNS? 55
Why Do We Need DNS? 56
How DNS Works (Step by Step) 56
What Are Nameservers? 57
Types of DNS Records 58
Changing Nameservers and DNS Records 58
Propagation Delay 59
Using Custom Subdomains 59
Conclusion 60
10 Hosting and Deployment 61
What Is Web Hosting? 61
Types of Web Hosting 62
Popular Hosting Platforms 62
Example of Manual Deployment (Using FTP) 63
Domain and Hosting Connection 65
Secure Hosting and HTTPS 65
Best Practices for Hosting and Deployment 65
Conclusion 66
11 Internet Security and HTTPS 67
Why Internet Security Matters 67
What Is HTTPS? 68
How HTTPS Works 69
What Is an SSL Certificate? 69
Why HTTPS Is Important 70
Common Website Security Practices 70
Recognizing Secure and Insecure Websites 71
Conclusion 72
12 Content Delivery and Optimization 73
What Is Content Delivery? 73
The Role of CDNs (Content Delivery Networks) 74
Popular CDN Providers: 74
Other Optimization Techniques 75
Load Balancing and Traffic Management 76
13 The Deep Web and Dark Web 79
The Surface Web: The Public Layer of the Internet 79
The Deep Web: The Hidden Yet Legal Internet 80
How to Access the Dark Web 81
Search Engines on the Dark Web 81
Use Cases and Realities 82
Why the Deep and Dark Web Exist 83
How Big Are These Web Layers? 83
Summary and What’s Next 84
14 How Search Engines Work 85
1. Crawling: Discovering the Web 85
2. Indexing: Organizing the Web 86
3. Ranking: Deciding What to Show First 87
4. Webmaster Tools: Helping Site Owners 88
5. Controlling Indexing and Crawling: Meta Tags 88
6. Search Engine Pings: Speeding Up Indexing 89
7. Search Engine Optimization (SEO): Improving Visibility 89
8. Surface Web vs. Deep Web vs. Dark Web 90
9. Dark Web Search Engines 90
Summary 91
Next Chapter Preview 91
15 Domains, ICANN, and How Websites Get Online 92
Introduction 92
The Birth of the Internet and Domain Names 93
Why the U.S. Dominates Internet Infrastructure 94
The Role of ICANN 94
How Domain Names Work 95
The Structure of a Domain Name 95
How to Register a Domain Name 96
Creating Your Own TLD (like .nabil) 96
Hosting and Getting Online 97
Why Domain Ownership Still Skews American 97
Domain Facts and Figures 98
Summary 98
16 Turning Your Computer into a Server 99
Introduction: What If You Could Be Google? 99
What Is a Server? Really. 99
How to Turn Your Computer into a Server 100
Security Basics 105
Summary 106
17 Everyday Internet Tasks You Should Know 107
18 The Future of the Internet 115
19 The Internet of Things (IoT) and Cloud Computing 121
20 Data Transfer Methods – Wired, Wireless, and Beyond 130
Introduction 130
21 Biotechnology, Genetics, and the Internet’s Role in... 137
22 Artificial Intelligence and Machine Learning 148
1.Introduction: The Rise of AI in the Digital Age 148
2. What is Artificial Intelligence? 149
3. How AI Works: The Building Blocks 150
4. How AI Learns: The Mechanics of Machine Learning 152
5. Python and NumPy: Building a Simple AI Model 154
6. The History of AI: Who Invented It? 155
Key Contributors 157
7. The Internet’s Role in AI Development 157
8. The Future of AI 158
9. Can AI Harm Humans? 159
10. Fun Projects and Explorations 161
Conclusion 162
23 The Role of APIs and Web Services in Modern Internet 164
1. Introduction: The Backbone of the Connected Web 164
2. What Are APIs and Web Services? 164
3. How APIs and Web Services Work 166
4. The Role of APIs in the Modern Internet 167
5. Practical Example: Interacting with an API Using Python 168
6. Security Considerations for APIs and Web Services 170
7. The Internet’s Role in API Ecosystems 171
8. Challenges in API and Web Service Development 172
9. Future Trends in APIs and Web Services 172
10. Fun Projects and Explorations 173
24 Cloud Computing in Depth 175
1. Introduction: The Cloud Revolution 175
2. What is Cloud Computing? 175
3. How Cloud Computing Works 177
4. Major Cloud Providers 178
5. Practical Example: Interacting with AWS S3 Using Python 179
6. Benefits of Cloud Computing 181
7. Security in Cloud Computing 181
8. The Internet’s Role in Cloud Computing 183
9. Challenges in Cloud Computing 183
10. Future Trends in Cloud Computing 184
11. Fun Projects and Explorations 184
Conclusion 186
25 Social Media and the Internet 187
1. Introduction: The Social Internet 187
2. The Evolution of Social Media 187
3. How Social Media Works: Technical Foundations 189
4. The Role of APIs in Social Media 190
5. Practical Example: Interacting with the X API Using Python 191
6. The Impact of Social Media 192
7. Security and Privacy in Social Media 193
8. The Internet’s Role in Social Media 194
9. Ethical Challenges 195
10. Future Trends in Social Media 196
11. Fun Projects and Explorations 196
Conclusion 198
26 Internet Governance and Cyber Laws 199
1. Introduction: Governing the Global Internet 199
2. What is Internet Governance? 199
3. Key Organizations in Internet Governance 201
4. Cyber Laws: Legal Frameworks for the Digital World 201
5. How Cyber Laws Work 203
6. Practical Example: Analyzing Website Security Head-
ers with Python 204
7. The Role of the Internet in Governance and Cyber Laws 206
8. Challenges in Internet Governance and Cyber Laws 206
9. Case Studies 208
10. Future Trends in Internet Governance and Cyber Laws 208
11. Fun Projects and Explorations 209
Conclusion 211
27 Emerging Internet Technologies 212
1. Introduction: The Next Frontier of the Internet 212
2. 5G: The Fifth Generation of Wireless Connectivity 213
3. Blockchain: A Distributed Ledger Revolution 215
Practical Example: Creating a Simple Blockchain in Python 216
4. Decentralized Web (Web3): A User-Centric Internet 219
Technical Foundations 220
5. Quantum Internet: The Next Leap in Connectivity 221
6. Other Emerging Technologies 223
7. The Internet’s Role in Emerging Technologies 223
8. Challenges and Ethical Considerations 223
9. Future Implications 224
10. Fun Projects and Explorations 224
Conclusion 226
28 Basic Terminal Commands and Networking Tools 227
1. Introduction: The Power of the Terminal 227
2. Why the Terminal is Still Powerful 228
3. Essential Terminal Commands 228
4. Networking and Security Tools 232
5. Practical Example: Network Scanning with Python and nmap 235
6. Common Use Cases 236
7. Overview of CLI and Security Tools, and Popular Tools 237
8. Safety Tips 238
9. Future Trends in CLI and Networking Tools 239
10. Fun Projects and Explorations 240
Conclusion 241
29 Wrapping It All Up – The Internet, You, and the Future 243
1. Introduction: Reflecting on the Internet’s Journey 243
2. Summary of the Journey 244
3. How to Stay Updated 246
Practical Tools 248
Practical Example: Web Scraper for Tech News 248
4. Encouragement to Explore 250
5. The Internet’s Future: Opportunities and Responsibilities 252
6. Final Message: Use the Internet Wisely 253
7. Fun Projects and Explorations 253
Conclusion 254
30 References 255
About the Author 260
Foreword
This book, written by Nabil Bin Billal, is a journey into the fascinating
world behind the screen. It begins with the basics of internet structure
and protocols, then explores more advanced topics like domains, DNS,
cybersecurity, content delivery, the deep web, cloud computing, and even
the intersection of biotechnology and the internet. It’s not just a technical
guide—it’s a thoughtful explanation of how the internet has evolved, how it
works, and where it’s heading.
What makes this book stand out is its clarity. Nabil explains even complex
ideas in a simple, reader-friendly language without watering down the facts.
He uses real-world examples, relatable analogies, and personal curiosity to
bring technical concepts to life. Whether you’re a curious student, a new
developer, or just someone who wants to better understand the digital world
you live in, this book will empower you with essential knowledge.
ix
Welcome to the internet—explained.
x
1
1
INTERNET & PROTOCOLS
Think of the internet as a digital highway system. Your device (a client) sends a
request to access information, such as opening a website. That request travels
across various “roads” — cables, routers, and servers — until it reaches its
destination (the server). The server then responds with the requested data,
such as a web page or video, which is sent back to your device.
For example, when you type apple.com into your browser, your device asks a
server to load that page. The response — including images, text, and layout
— is transmitted back to you using a set of predefined rules known as internet
protocols.
Understanding how the internet works isn’t just for engineers or programmers.
In today’s digital world, even basic knowledge can help you:
This chapter provides a foundation for the topics that follow, helping you
move from internet user to internet builder — with confidence.
2
2
3
INTERNET & PROTOCOLS
The development of internet protocols began in the 1970s when the need
for a standardized way to communicate over networks became clear. The
Transmission Control Protocol (TCP) and Internet Protocol (IP), collectively
known as TCP/IP, became the foundation for internet communication. These
protocols allowed different types of networks to connect and communicate,
ultimately giving birth to the modern internet.
Later, HTTP (Hypertext Transfer Protocol) was developed for the World Wide
Web, enabling browsers to request and display web pages. Over time, other
protocols like HTTPS, FTP, and DNS were introduced to handle specific tasks,
such as secure communication and domain name resolution.
4
INTRODUCTION TO INTERNET PROTOCOLS
protocols are and why they are important. As you progress through this
book, you will gain a deeper understanding of specific protocols and how
they work together to make the internet function.
At its core, the internet is a system of networks. These networks are connected
through physical infrastructure like cables, wireless connections, satellites,
and routers. This means that when you request a website or send an email,
your device communicates through these networks to reach the destination.
5
INTERNET & PROTOCOLS
The process of how data travels across the internet is quite complex but can be
simplified. When you request a website, here’s a basic overview of how data is
transmitted:
Step 1: Your device sends a request to the server where the website is hosted.
Step 2: The request is sent via routers and other networking devices that direct
the data through the correct paths.
Step 3: The server receives the request, processes it, and sends the necessary
data (e.g., the contents of the website) back to your device.
Step 4: The data reaches your device, and your browser displays the website.
6
INTRODUCTION TO INTERNET PROTOCOLS
Each step in this process is guided by specific protocols, including IP, to ensure
the data reaches its destination accurately.
The internet, at its core, is made up of several key components that work
together to enable seamless communication across the globe. These compo-
nents include routers, servers, clients, and Internet Service Providers (ISPs).
Understanding how each of these plays a role will give you a better grasp of
how data moves and how internet protocols facilitate this communication.
Routers
Routers are devices that direct the flow of data on the internet. They act as
traffic managers, determining the best route for data packets to take to reach
their destination. When you send a request, such as loading a website, the
router figures out how to route the data through the internet, based on the
destination IP address.
7
INTERNET & PROTOCOLS
Servers
Servers are powerful computers that store data and provide services to clients
(like your computer or smartphone). When you access a website, the server
hosting that website responds by sending the necessary data (like the content
of the page) back to your device.
Servers can handle multiple requests at once and are designed to provide
continuous service. Different types of servers are used for specific tasks:
And more!
Clients
In the context of the internet, a client refers to any device that connects to the
internet to access services, such as a computer, smartphone, or tablet. Clients
send requests to servers, which respond by sending back the necessary data.
For example, when you open a web browser and type in a website’s URL, your
8
INTRODUCTION TO INTERNET PROTOCOLS
device (the client) sends a request to the web server that hosts the site. The
server processes the request and sends back the information to be displayed
in your browser.
ISPs manage the infrastructure that allows data to travel across the internet.
They provide the physical lines (e.g., fiber optics, DSL, or cable) that connect
you to the global network. Without ISPs, individuals and businesses would
have no way to access the internet.
9
INTERNET & PROTOCOLS
The two most fundamental protocols involved in data transmission are the
Transmission Control Protocol (TCP) and the Internet Protocol (IP). Together,
they form what is known as TCP/IP, the fundamental technology behind the
modern internet.
Let’s dive deeper into how TCP and IP work, with real-world examples, to give
you a better understanding of their roles.
Imagine you’re downloading a file from the internet. Here’s how TCP ensures
the file reaches your device correctly:
1. Breaking the Data Into Packets: When you initiate the download, the file is
broken down into smaller parts, called packets. Each packet contains a portion
10
INTRODUCTION TO INTERNET PROTOCOLS
of the data you requested, plus information about its order and destination.
4. Reassembling the Packets: Once all packets have been received, TCP
reassembles them in the correct order on the receiver’s side. Even if packets
arrive out of order, TCP knows where each one belongs and will reorder them.
When you open a webpage, TCP breaks the webpage data into small packets.
These packets travel across the internet, through multiple routers and servers.
Each packet reaches your computer in the correct order, and the page is
displayed correctly in your browser.
Without TCP, if a packet got lost during transmission, you might see a broken
webpage or incomplete data.
11
INTERNET & PROTOCOLS
While TCP ensures that data arrives intact and in the correct order, Internet
Protocol (IP) is responsible for addressing and routing the data packets. IP’s
job is to make sure the data packets find their way from the source to the
destination, using unique IP addresses for each device on the network.
How IP Works:
When data is sent over the internet, it travels as packets, just like in TCP. Each
packet has an IP address that tells it where to go. Here’s how it works:
2. Routing the Data: When you send data, IP helps route it from the source to
the destination by breaking it into packets. These packets travel independently
and can take different routes through the network based on the current
network conditions. Each router along the way reads the packet’s destination
IP address and forwards it closer to its destination.
12
INTRODUCTION TO INTERNET PROTOCOLS
3. Reaching the Destination: Once the packets reach the final destination
(your device, for example), IP directs them to the right place on your device
where they can be processed and used.
Example of IP in Action:
Let’s say you’re trying to visit a website, like www.example.com. When you
enter the URL in your browser, the DNS (Domain Name System) converts the
human-readable address to an IP address (e.g., 93.184.216.34). Then, using IP,
the data packets are routed to that address.
In this case, IP ensures that the packets carrying the website’s data reach the
correct server, and once it arrives at the server, IP ensures it finds its way to
your device.
TCP and IP are often referred to together as TCP/IP because they complement
each other in ensuring reliable, ordered, and efficient data transfer. Here’s
how they work together:
1. Breaking the Data (TCP): TCP breaks the data into packets and adds its own
header to each packet. The header contains information about the sequence
of the packets and ensures that the data can be reassembled correctly.
2. Routing the Packets (IP): After the packets are created by TCP, IP takes
over. IP adds the source and destination IP addresses to each packet, ensuring
that the packets reach their destination correctly. It then routes them across
13
INTERNET & PROTOCOLS
3. Reassembling the Data (TCP): Once the packets reach their destination,
TCP reassembles them into the original data and ensures no data is lost or out
of order. This process is invisible to the user, but it’s crucial for maintaining
the integrity of the communication.
TCP breaks the message into small packets, adds sequence information, and
sends it.
IP takes care of the routing of each packet to the mail server, ensuring they
travel across the internet.
Once all packets reach the destination, TCP reassembles them into the original
email.
This seamless cooperation between TCP and IP ensures that data is sent
efficiently and reliably, regardless of the distance between devices or the type
of network they are on.
14
INTRODUCTION TO INTERNET PROTOCOLS
In this section, we’ve explored the critical roles that TCP and IP play in
enabling smooth and reliable communication over the internet. These
protocols are fundamental to the functioning of the modern internet, allowing
you to send emails, browse websites, and stream videos without interruptions.
Next Steps
In the following sections, we will look into more specialized protocols like
HTTP, FTP, DNS, and others. We’ll also dive deeper into their roles and how
they help the internet function efficiently.
15
3
Overview of TCP
The Transmission Control Protocol (TCP) is a key player in ensuring that data
can be reliably sent and received across the internet. It’s used in most internet
communication systems, ranging from web browsing to file transfers. TCP is
part of the TCP/IP suite, and its main job is to ensure the reliable delivery of
data.
TCP ensures that data sent over the internet arrives without errors, in the
correct order, and without any loss of information. It does this by breaking
data into small chunks called packets, sending those packets to the destination
device, and making sure that all packets are received and correctly assembled.
16
THE TRANSMISSION CONTROL PROTOCOL (TCP) IN DETAIL
1. Connection Establishment
Before any data can be transferred between two devices, TCP must first
establish a connection. This is done through a process called the Three-Way
Handshake, which involves three main steps:
Step 1: SYN: The client (the device sending the data) sends a packet with
a special flag called SYN (synchronize) to the server, asking to initiate a
connection.
Step 2: SYN-ACK: The server responds by sending a packet back to the client
with both the SYN flag and an ACK (acknowledgment) flag, confirming the
request.
Step 3: ACK: Finally, the client sends a packet with an ACK flag to the server,
confirming that the connection is established.
This process ensures that both sides are ready for data transfer.
2. Data Transfer
Once the connection is established, the devices can begin transferring data.
The data is broken down into smaller packets by the sender’s device. These
17
INTERNET & PROTOCOLS
Each packet contains a sequence number that tells the receiver in which order
to reassemble the packets.
If the sender does not receive an acknowledgment, it will resend the packet
until it’s successfully received.
3. Flow Control
TCP uses flow control to prevent the sender from overwhelming the receiver
with too much data at once. The receiver can control the flow by telling the
sender how much data it can handle at a time. This is done through the window
size mechanism.
The sender will only send a limited number of packets, based on the window
size specified by the receiver.
As the receiver processes data, it will update the sender on how much more
data can be sent, preventing congestion and ensuring a smooth data flow.
18
THE TRANSMISSION CONTROL PROTOCOL (TCP) IN DETAIL
One of the most important features of TCP is its ability to detect errors in data
transmission and correct them. Here’s how it works:
Checksums: TCP adds a checksum to each packet to verify its integrity. When
the receiver gets the packet, it calculates its own checksum and compares it
to the one sent in the packet. If they don’t match, the packet is considered
corrupted.
5. Connection Termination
Once the data transfer is complete, TCP closes the connection. This process is
called connection termination, and it happens in four steps:
Step 1: FIN: The client sends a FIN (finish) packet to the server, signaling that
it’s done sending data.
Step 2: ACK: The server acknowledges the receipt of the FIN packet.
Step 3: FIN: The server sends its own FIN packet to the client, indicating that
it’s done sending data.
Step 4: ACK: The client acknowledges the server’s FIN packet, and the
connection is fully closed.
19
INTERNET & PROTOCOLS
3. Error Detection: If any packets are lost or corrupted during the transmis-
sion, the browser requests that the server resend them.
4. Flow Control: The server sends the data in manageable chunks, based on
how much the browser can handle at once.
5. Connection Termination: Once the entire web page is transferred, both the
browser and the server close the connection using the four-step termination
process.
In this example, TCP ensures that all the packets arrive in the right order and
that no data is lost, allowing your web page to load seamlessly.
Summary of TCP
Reliable communication: Ensures data arrives in the correct order and with
no errors.
20
THE TRANSMISSION CONTROL PROTOCOL (TCP) IN DETAIL
Flow Control: Prevents the sender from overwhelming the receiver with too
much data.
Error Detection and Recovery: Ensures that corrupted or lost packets are
retransmitted.
21
4
Overview of IP
The Internet Protocol (IP) is a set of rules that govern how data is sent and
received over the internet. While TCP ensures the reliable transmission of
data, IP handles the addressing and routing of packets to ensure they reach
their correct destination.
How IP Works
Let’s take a closer look at how IP operates to send data packets to the right
destination:
22
THE INTERNET PROTOCOL (IP) IN DETAIL
1. IP Addressing
IPv4 (Internet Protocol version 4): IPv4 addresses are written in a format
like 192.168.1.1. They consist of 32 bits, which gives us over 4 billion unique
addresses. While IPv4 was the first and remains the most widely used version,
the number of devices connected to the internet has grown, and the supply of
IPv4 addresses is running out.
IPv6 (Internet Protocol version 6): IPv6 was introduced to provide more
address space. It uses 128-bit addresses, which means there are an almost
infinite number of unique addresses available. IPv6 addresses are written in a
format like 2001:0db8:85a3:0000:0000:8a2e:0370:7334.
2. Packet Routing
Once data is broken into packets (via TCP), the IP layer takes responsibility for
routing those packets from the source device to the destination device. Here’s
how routing works:
Source IP: Each packet has a header that includes the source IP address (where
the data is coming from) and the destination IP address (where the data is
23
INTERNET & PROTOCOLS
going).
Routers: Routers are special devices that direct packets across networks. They
examine the destination IP address and forward the packet along the best
available route, based on the routing tables they maintain.
Intermediate Devices: Along the way, packets may pass through multiple
routers and networks before they finally reach their destination device. At
each hop, routers examine the destination IP and pass the packet further along
its journey.
The IP protocol ensures that each packet finds the best path to its destination,
even if there are changes in the network or congestion along the way.
The IP layer breaks large packets into smaller fragments that can be transmit-
ted over the network.
These fragments are sent individually to their destination, where the receiving
device reassembles them into the original packet. This allows for the efficient
transmission of data even over networks with limited capacity.
24
THE INTERNET PROTOCOL (IP) IN DETAIL
While the IP address works to route packets over the internet, it’s not enough
for devices on a local network to communicate. On a local network, devices
communicate using MAC addresses (Media Access Control addresses), which
are unique identifiers for each network interface.
When one device wants to communicate with another on the same network, it
sends out an ARP request to find the MAC address associated with the target
device’s IP address.
Example of IP in Action
Let’s look at an example of how IP helps data travel from one device to another:
2. Packet Creation: Your computer breaks the email into smaller packets using
TCP. Each packet is labeled with your computer’s IP address as the source and
your friend’s IP address as the destination.
3. Packet Routing: These packets are sent through various routers and
networks on the internet, with each router looking at the destination IP
25
INTERNET & PROTOCOLS
address and forwarding the packets along the most efficient path.
4. Fragmentation: If the packets are too large for some networks, they may
be fragmented into smaller pieces and reassembled at the destination.
Through this process, IP ensures that your email reaches the correct destina-
tion, regardless of the network configurations, routers, or devices it needs to
pass through.
Summary of IP
Packet Routing: Ensures data packets are routed across networks to reach
their destination.
26
THE INTERNET PROTOCOL (IP) IN DETAIL
In this chapter, we’ve looked at Internet Protocol (IP) and how it enables
devices to communicate over the internet by addressing and routing data
packets. IP works alongside TCP to ensure that data gets to its destination
reliably and efficiently. In the next chapter, we’ll explore HTTP (Hypertext
Transfer Protocol) and its role in accessing web pages and services over the
internet.
27
5
What is HTTP?
HTTP is the protocol used for transferring web pages and resources over the
internet. It defines the rules and conventions for how browsers (clients) and
web servers communicate. HTTP allows users to load websites and access web
resources, such as images, videos, and text.
28
HOW PROTOCOLS WORK
Example: When you visit a blog, your browser sends an HTTP GET request to
the server. The server responds with the requested HTML code, CSS files, and
images. The browser then renders these resources to display the webpage.
HTTP Methods
GET: Used to retrieve data from the server. For example, when you type a URL
in the browser’s address bar, the browser sends a GET request to fetch the
page.
POST: Used to send data to the server. It’s often used in forms, where a user
submits information (like a login form or a search query).
29
INTERNET & PROTOCOLS
HTTP is stateless, meaning that each request is independent, and the server
doesn’t retain information about previous requests. This ensures simplicity
and scalability.
Example: After you submit a form on a website, the server doesn’t remember
you when you reload the page. This is why many websites use cookies or
sessions to store information about users.
Transition to HTTPS
Example: When you log into your online banking account, the website uses
HTTPS to ensure your sensitive data, such as your password and account
number, is encrypted and protected from eavesdroppers.
30
HOW PROTOCOLS WORK
What is FTP?
FTP is used for transferring files between a client and a server. It’s commonly
used to upload or download files to and from websites or cloud storage. FTP
allows users to manage files on remote servers, such as updating a website
with new files or downloading documents from a server.
Active Mode: In active mode, the client opens a random port and the server
connects back to it. This method can be problematic if the client is behind a
firewall.
Passive Mode: In passive mode, the server opens a port and the client connects
to it. This is often used in modern FTP applications as it works better with
firewalls.
31
INTERNET & PROTOCOLS
FTP Commands
Example: Using the RETR command to download a file like RETR index.html
from the server.
Security with FTP
FTPS (FTP Secure): FTP with added security using SSL/TLS encryption.
SFTP (SSH File Transfer Protocol): Secure alternative to FTP, using SSH for
encryption and authentication.
32
HOW PROTOCOLS WORK
What is SMTP?
SMTP is the protocol used for sending emails between email clients and
servers. It defines how email messages are routed from the sender’s email
client to the recipient’s email server, ensuring that the message reaches its
destination.
When you send an email, your email client (like Outlook or Gmail) sends the
message via SMTP to the outgoing mail server (SMTP server). The server then
routes the email to the recipient’s mail server, where it is delivered to the
recipient’s inbox.
Example: You send an email to a friend. Your email client uses SMTP to connect
to your email provider’s SMTP server. The server processes the message and
sends it to your friend’s email provider. The message is then stored in your
friend’s inbox, ready to be read.
SMTP Workflow
33
INTERNET & PROTOCOLS
2. The email is sent via the SMTP protocol to the sender’s SMTP server.
3. The SMTP server communicates with other mail servers to find the
recipient’s server.
4. The recipient’s server stores the email in their inbox, ready to be retrieved
using POP3 or IMAP.
SMTP vs POP3/IMAP
SMTP is used for sending emails, while POP3 (Post Office Protocol) and IMAP
(Internet Message Access Protocol) are used to retrieve and store emails from
a mail server.
Example: When you open your inbox in Gmail, you are using IMAP to fetch
new messages from Google’s mail server.
What is DNS?
34
HOW PROTOCOLS WORK
When you type a URL into your browser, your device queries DNS servers to
resolve the domain name into an IP address. Once the IP address is found,
your browser can connect to the web server hosting the website.
MX Record: Specifies the mail server for receiving emails for a domain.
TXT Record: Used for additional information, often for domain verification
or security purposes (e.g., SPF records for email security).
Example: When you set up a custom email address for your domain, you would
configure the MX records to ensure emails are routed to the correct mail server.
35
INTERNET & PROTOCOLS
DNS Servers
Primary DNS Server: The main DNS server responsible for resolving domain
names.
Secondary DNS Server: A backup DNS server that can be used if the primary
server is unavailable.
Summary
HTTP: Handles the transfer of web pages and resources between clients and
servers.
These protocols are the backbone of many internet services and work together
to ensure smooth communication across networks.
36
6
Introduction to Websites
1. What Is a Website?
A website is a collection of web pages, files, and content stored on a web server.
When you visit a site, your browser loads these files and displays them on your
screen.
For example, when you visit bidibo.xyz, your browser fetches content stored
on a web server and displays it.
37
INTERNET & PROTOCOLS
2. The browser asks a DNS server to find the actual IP address behind the
domain.
3. Once found, your browser connects to that IP address and requests the
website.
Example:
The browser uses that to connect to Apple’s servers and load the website.
Web hosting is where a website lives. It’s a service that stores your site’s files
and serves them to visitors.
38
INTRODUCTION TO WEBSITES
Hosting Types:
Example:
A web browser (like Chrome or Safari) is what you use to visit websites. It talks
to a web server, which stores and delivers the site files.
39
INTERNET & PROTOCOLS
Example:
• Static Website: Fixed content. Each visitor sees the same page.
40
INTRODUCTION TO WEBSITES
6. A Real-World Example
5. Your browser displays the site with animations and product links.
6. You click “Buy iPhone” – your browser sends another request to Apple’s
servers, which may access a database to show pricing or stock.
Similarly, when you visit bidibo.xyz, the browser connects to the hosting
server and loads pages, like the blog or science content, depending on what
41
INTERNET & PROTOCOLS
you click.
When you browse websites, you’ll often see web addresses (URLs) with extra
parts, like:
https://www.bidibo.xyz/product?id=8
or
https://apple.com/checkout
These URL parameters and paths help websites know what content or action
the user is looking for.
Example:
https://bidibo.xyz/product?id=8
42
INTRODUCTION TO WEBSITES
Here:
?id=8 tells the site to load product number 8 from its database
https://bidibo.xyz/product?id=9
• Filter content
43
INTERNET & PROTOCOLS
Real Examples:
Instead of query parameters, many websites use clean, readable paths. These
make URLs more user- and SEO-friendly.
Examples:
44
INTRODUCTION TO WEBSITES
In Summary:
Query Parameters like ?id=8 help websites fetch dynamic content using specific
details.
Structured Paths like /checkout are clean and clear ways to navigate different
sections of a site.
Both are essential tools for building interactive, user-friendly, and searchable
websites.
45
7
The internet today is full of websites that change based on user input or content
updates—these are called dynamic websites. At the heart of these dynamic
features are databases and JavaScript, often working together.
What Is a Database?
A database is where websites store all their content: text, images, articles,
user profiles, and more.
For example, on a news site like bidibo.xyz, the database may contain:
46
DATABASES, JAVASCRIPT, AND DYNAMIC CONTENT
• Comments
Each article has a unique ID (e.g., id=37), and when a user clicks on it, the
website fetches it from the database and shows it on the screen.
4. The content is sent back to the browser and shown to the user.
47
INTERNET & PROTOCOLS
• Fetch data from the database in the background using AJAX or APIs
/api/articles?page=2
48
DATABASES, JAVASCRIPT, AND DYNAMIC CONTENT
These paths make it easy for both users and search engines to understand the
site’s structure.
In Summary:
49
8
In the modern internet, domain names and URLs serve as the core of navigation
and resource identification. Whether you’re visiting a news site like Bidibo.xyz,
a tech company like Apple.com, or a personal portfolio like nabilbinbillal.gith
ub.io, you’re relying on a domain name and a structured URL to access content.
This chapter will break down what domain names and URLs are, how they
work, and why they matter—both technically and from a user perspective.
Top-Level Domain (TLD): The last part of the domain, such as .com, .org,
50
UNDERSTANDING DOMAINS & URLS
Second-Level Domain (SLD): The unique name you choose, like bidibo or
nabilbinbillal.
Examples:
What Is a URL?
A URL (Uniform Resource Locator) is the full web address used to locate specific
content on a website. It includes the domain name and can also contain a
protocol, path, query parameters, and fragments.
Structure of a URL
https://www.example.com/products/item?id=8#details
51
INTERNET & PROTOCOLS
#details → Fragment (optional, often used for navigation within the page)
Static URLs remain the same for everyone and typically refer to fixed content.
Example: https://bidibo.xyz/about
Dynamic URLs change based on user actions or data fetched from a database.
Dynamic URLs are commonly used in modern websites where content is pulled
from a backend system.
Many websites are organized using specific URL structures for clarity and
routing logic. These often indicate the function of a page or its hierarchy.
52
UNDERSTANDING DOMAINS & URLS
Examples:
Subdomains
Examples:
53
INTERNET & PROTOCOLS
A clear, consistent URL structure is not only helpful for users, but also crucial
for:
Conclusion
Domains and URLs are the cornerstones of how users and systems navigate
the web. Understanding how they’re structured—and how to design them
logically—provides foundational knowledge for building and managing web-
sites. As we move into the next chapter, we’ll look at how these domain names
are actually resolved into IP addresses using the Domain Name System (DNS),
and how you can control these settings for your own website or server.
54
9
Imagine trying to call a friend, but instead of dialing their name, you must
remember a long string of numbers. That’s what the internet would feel
like without the Domain Name System (DNS). DNS is the phonebook of
the internet—it translates user-friendly domain names like apple.com or
bidibo.xyz into IP addresses like 17.253.144.10, which computers use to identify
each other.
In this chapter, we’ll explore how DNS works, what nameservers are, and why
they are essential to every website’s accessibility.
What Is DNS?
55
INTERNET & PROTOCOLS
Example:
Typing bidibo.xyz in your browser sends a request to DNS servers to find the
IP address associated with that domain, say 192.168.1.50. Once found, your
browser connects to that IP and loads the site.
Scalability: DNS supports the global scale of the internet, with billions of users
and devices.
3. If not found, it asks the Local DNS Resolver (usually your ISP) to find it.
56
THE DOMAIN NAME SYSTEM (DNS) AND NAMESERVERS
Nameservers are specialized DNS servers responsible for storing DNS records
of a domain. When you buy a domain (e.g., yourwebsite.com), you must assign
nameservers so the internet knows where to find your site.
Cloudflare: ns1.cloudflare.com
GoDaddy: ns1.domaincontrol.com
Example:
If you point bidibo.xyz to Cloudflare’s nameservers, any DNS queries about
it will go through Cloudflare’s network, which then provides the necessary IP
and settings.
57
INTERNET & PROTOCOLS
DNS uses different types of records to handle specific information. Here are
the most common:
Record TypePurposeExample
TXT Custom text records (e.g., for verification) Google, SPF, etc.
Edit DNS Records: You can point your domain to a new hosting IP, set up
subdomains, configure email services, or verify domain ownership (e.g., for
Google Search Console).
58
THE DOMAIN NAME SYSTEM (DNS) AND NAMESERVERS
Example:
To host a portfolio on GitHub Pages like nabilbinbillal.github.io, you might
set a CNAME record pointing portfolio.nabilbinbillal.com to nabilbinbillal.git
hub.io.
Propagation Delay
DNS changes don’t take effect immediately. They need to propagate across
global servers, which can take from a few minutes to 48 hours depending on:
59
INTERNET & PROTOCOLS
Conclusion
DNS and nameservers form the digital address system that powers internet
navigation. They allow users to access your site easily, while giving developers
the flexibility to host, update, and scale websites. Understanding how DNS
functions—especially DNS records and nameservers—is essential for building,
managing, or even just understanding how websites are accessed.
In the next chapter, we’ll explore hosting and deployment, covering how
websites actually get online, the types of hosting available, and how they tie
into the domain and DNS systems you’ve just learned about.
60
10
Once you’ve built a website, the next step is making it publicly available. This
is done through hosting and deployment. Hosting refers to storing your
website’s files on a server so others can access them online. Deployment
is the process of putting your site’s code and content onto that server.
In this chapter, we’ll explore what web hosting is, how it works, different
types of hosting, and how to deploy your site using real-world examples like
bidibo.xyz, apple.com, and nabilbinbillal.github.io.
Web hosting is a service that stores the files and data of your website on a server
connected to the internet. When someone types your website’s address—like
bidibo.xyz—into their browser, the hosting server sends the website’s files to
their device so they can view the page.
Hosting services ensure your site is always online, loads quickly, and is
protected from common threats. It’s the foundation that keeps a website
accessible and functioning properly.
61
INTERNET & PROTOCOLS
There are several types of web hosting, each with its own use case:
• Shared Hosting: Your website shares a server with many others. It’s
cost-effective but limited in resources. Best for small blogs or personal
sites.
• VPS (Virtual Private Server) Hosting: You share the server, but each
site has its own reserved space. Offers more control and power, ideal for
growing projects.
• Dedicated Hosting: You rent an entire server for your website. It’s
powerful and customizable, suitable for high-traffic websites.
• Cloud Hosting: Your site is hosted across many servers. It’s scalable and
reliable, often used by apps and businesses with unpredictable traffic.
• Static Hosting: For websites that don’t need a backend, like portfolios or
blogs. Services like GitHub Pages, Netlify, and Vercel are popular choices.
• Managed Hosting: The hosting provider takes care of technical details
like updates and backups. Useful for WordPress and other CMS-based
websites.
62
HOSTING AND DEPLOYMENT
Netlify and Vercel: Great for frontend frameworks like React, Vue, or Svelte.
They offer features like automatic deployment from GitHub and serverless
functions.
DigitalOcean, AWS, and Google Cloud: Powerful and flexible, good for
developers who want full control over hosting and infrastructure.
What Is Deployment?
It includes:
You can use an FTP client like FileZilla to connect to your hosting server. After
logging in, you upload your website files into the server’s public directory—
often called public_html. Once uploaded, people can visit your domain and
see your site.
63
INTERNET & PROTOCOLS
If you’re using GitHub, you can link your repository to Netlify. Every time
you push code to GitHub, Netlify will automatically build and deploy your site.
This is efficient for development and helps keep your live site up to date.
If your website uses databases or server-side code like PHP, Python, or Node.js,
you’ll need a hosting provider that supports backend functionality.
For example:
A news site like bidibo.xyz may display articles dynamically based on database
content.
A blog might use pagination like /page/2/ or custom URLs like /category/-
science/.
These features depend on backend logic and dynamic rendering using server-
side code and a database such as MySQL or MongoDB.
64
HOSTING AND DEPLOYMENT
To make your website available at a domain name like bidibo.xyz, you need to:
Once connected, visiting your domain will display the contents hosted on your
server.
Security is crucial. Websites today should use HTTPS to encrypt data between
the server and the user’s browser. Most hosting providers offer free SSL
certificates through Let’s Encrypt or other services. SSL is especially important
for sites that involve logins, payments, or personal data.
• Choose a hosting plan that fits your website’s size and needs.
• Always back up your files and database.
• Use version control (like Git) to manage your source code.
• Monitor your site’s uptime and performance.
65
INTERNET & PROTOCOLS
Conclusion
Hosting and deployment are essential for taking a website from your computer
to the world. Whether you’re launching a simple portfolio or a complex news
site like bidibo.xyz, understanding how hosting works and how to deploy your
code is key to maintaining a professional and reliable web presence.
In the next chapter, we’ll explore Internet Security, where you’ll learn how
to protect your website and users from threats using HTTPS, firewalls, and
other security measures.
66
11
As more and more people rely on the internet for communication, banking,
shopping, education, and information sharing, security becomes critically
important. Without proper security measures, websites can be vulnerable to
hackers, data theft, malware, and fraud.
In this chapter, we’ll explore the basics of internet security, how HTTPS works,
why it matters, and how websites like apple.com, nabilbinbillal.github.io, and
bidibo.xyz implement secure practices to protect users and data.
67
INTERNET & PROTOCOLS
What Is HTTPS?
When you visit a site like https://apple.com, your browser uses HTTPS to
establish a secure connection. This means that any data you send (like search
queries, login info, or payment details) is scrambled in a way that only the
website can understand.
Web browsers like Chrome or Firefox also display a lock icon in the address
bar when HTTPS is enabled, reassuring users that the connection is safe.
68
INTERNET SECURITY AND HTTPS
This prevents third parties from reading or tampering with the data in transit.
Most modern hosting providers (like Netlify, Vercel, Namecheap, and GitHub
Pages) offer free SSL certificates. For example:
69
INTERNET & PROTOCOLS
bidibo.xyz, a news platform, uses HTTPS to ensure visitors can safely browse
news articles and interact without risk.
apple.com uses strong encryption and security policies to protect its global
user base.
If your site uses forms, user accounts, or personal content—even if it’s just
comments—HTTPS is a must.
In addition to HTTPS, here are other steps websites take to stay secure:
70
INTERNET SECURITY AND HTTPS
For instance, a dynamic site like bidibo.xyz that loads articles, filters news
by category, and displays search results must validate every user action to
prevent malicious behavior.
71
INTERNET & PROTOCOLS
Conclusion
In the next chapter, we’ll explore content delivery and optimization, where
you’ll learn how websites load faster by using global networks, caching, and
other techniques that ensure smooth performance.
72
12
As internet usage has become global, so has the expectation for speed. Users
now demand websites, videos, and services to load within seconds—regardless
of their location or device. From reading a blog on bidibo.xyz to watching a
product launch on apple.com, seamless experiences are not just desirable—
they’re expected. But how is such speed and reliability achieved?
This chapter explores the behind-the-scenes technologies and strategies
that power fast, optimized internet experiences, focusing on Content Delivery
Networks (CDNs), caching, compression, responsive content, and perfor-
mance enhancement techniques.
When you open a website, your device requests digital assets like HTML files,
CSS stylesheets, images, videos, and JavaScript code. These files must travel
across networks from the server where they are stored to your browser. The
further the physical distance between the server and the user, the more time
it takes—and the slower the site feels.
Content delivery is the process of getting these files to the user in the fastest,
most efficient way possible. It focuses on reducing latency (delay), managing
traffic loads, and improving user experience.
73
INTERNET & PROTOCOLS
Benefits:
• Cloudflare – Offers security and speed features, widely used for both
personal and business websites.
• Akamai – Used by major media and enterprise platforms.
• Amazon CloudFront – Integrated with AWS services.
• Google Cloud CDN, Fastly, StackPath, and Microsoft Azure CDN are also
major players.
74
CONTENT DELIVERY AND OPTIMIZATION
Beyond CDNs, web developers and network engineers employ several opti-
mization strategies to improve delivery speed and performance:
1. Caching
Caching stores frequently accessed data closer to the user or within the
browser, so it doesn’t need to be downloaded again each time. Types include:
3. Compression
Using tools like GZIP or Brotli, servers compress files before sending them,
significantly reducing size and speeding up delivery.
75
INTERNET & PROTOCOLS
5. Lazy Loading
Lazy loading defers the loading of images or videos until they are needed—for
example, when the user scrolls near them. This makes the initial page load
faster.
6. Asynchronous Loading
Scripts and stylesheets can be loaded in the background without blocking the
main page content, improving load performance and user perception.
• https://www.bidibo.xyz/news/item?id=23
• https://example.com/payment/step/2
• https://shop.example.com/products?page=4
76
CONTENT DELIVERY AND OPTIMIZATION
Dynamic sites use JavaScript, PHP, Node.js, and databases like MySQL or
MongoDB to build pages in real-time based on user actions or parameters.
• Articles are cached at the CDN layer to handle sudden reader surges.
• Images are optimized and lazy-loaded to reduce data use on mobile.
• Query parameters are used to fetch article data dynamically (?id=45).
• Static assets (like logos or fonts) are served from a CDN for speed.
According to studies, a delay of just 1 second in page load time can reduce
conversions by 7%. In e-commerce and news, speed is directly tied to revenue
and reader trust.
Summary
Optimizing how content is delivered over the internet is crucial for per-
formance, user experience, and reliability. Through techniques like CDNs,
caching, compression, responsive design, and load balancing, even complex
websites can deliver a seamless experience to users across the globe. Whether
77
INTERNET & PROTOCOLS
78
13
Most internet users only interact with the Surface Web—the part of the
internet that’s easily accessible through search engines like Google. However,
this visible layer is just the beginning. Beneath it lies a much larger, more
complex digital world composed of the Deep Web and the Dark Web. These
layers form the hidden infrastructure of the internet and are responsible for
secure data exchanges, anonymous communication, and more.
In this chapter, we’ll explore how these layers differ, what they contain,
how they’re accessed, and why understanding them is essential in a digitally
literate world.
The Surface Web (also known as the visible web or indexed web) includes
all web pages that are discoverable and accessible through standard search
engines.
79
INTERNET & PROTOCOLS
These pages are indexed by web crawlers, meaning they’re scanned and listed
by search engines like Google or Bing. They typically allow unrestricted access
and don’t require authentication or encryption for general viewing.
Despite its familiarity, the Surface Web makes up less than 10% of the entire
internet.
The Deep Web includes everything that exists behind a login or restricted
access—pages that search engines can’t see or index.
Examples of Deep Web Content:
Much of this data is hidden for security and privacy reasons, protecting
sensitive user information from public access. Though invisible to search
engines, this data is legitimate, widely used, and crucial to digital operations.
According to various research reports, over 90% of internet content resides
in the Deep Web, which serves as the secure infrastructure of today’s digital
economy and services.
80
THE DEEP WEB AND DARK WEB
Within the Deep Web exists an even more obscure segment—the Dark Web.
This part of the internet is intentionally hidden, and it requires special
software to access, such as the Tor (The Onion Router) Browser.
The Dark Web is not inherently illegal. However, its architecture is designed
to provide anonymity to both users and website hosts, which has led to both
legitimate and illegal usage.
Since traditional search engines don’t index .onion sites, users rely on special
tools:
• Ahmia – One of the most popular and user-friendly gateways into the
Dark Web. Available both on the Tor network and the Surface Web at
ahmia.fi.
81
INTERNET & PROTOCOLS
Due to the anonymous nature of the Dark Web, most content is not permanent.
Sites can disappear suddenly, change domains frequently, or only exist for a
short time.
It’s important to note that accessing the Dark Web is not illegal in most
countries. However, engaging in illegal activities while on the Dark Web
is a crime and punishable by law.
82
THE DEEP WEB AND DARK WEB
83
INTERNET & PROTOCOLS
The Deep Web and Dark Web are not fictional mysteries—they’re real, func-
tional layers of the internet that allow for security, privacy, and freedom of
information. While the Deep Web protects your digital identity and online
data, the Dark Web offers anonymity, with both good and bad implications.
In the next chapter, we will explore how search engines work on the Surface
Web, and how they fail to reach the Deep and Dark Web. We’ll also examine
privacy-based search engines like DuckDuckGo and Ahmia, and understand
how websites are crawled, indexed, and ranked.
84
14
Search engines are the gateways to the vast world of information on the
internet. Every day, billions of people rely on search engines like Google,
Bing, DuckDuckGo, and others to find relevant content quickly and easily. But
have you ever wondered how these search engines manage to organize and
present such enormous amounts of data in just a fraction of a second?
In this chapter, we will explore the detailed workings of search engines
— how they discover, store, and rank billions of web pages. We will also
discuss special search engines on the dark web, important webmaster tools,
and optimization techniques you can use to make your website more visible.
Search engines use automated programs called web crawlers or spiders (for
example, Googlebot for Google) to explore the internet. Crawlers start from a
set of known web pages and follow links to discover new pages.
85
INTERNET & PROTOCOLS
robots.txt File
The robots.txt file is a plain text file placed in the root directory of a website to
give instructions to crawlers about which pages or directories should not be
accessed.
User-agent: *
Disallow: /private/
Disallow: /temp/
Once pages are crawled, their content is stored and organized in a huge
database called the index. This index acts like a digital library catalog, enabling
quick retrieval of relevant pages for any search query.
86
HOW SEARCH ENGINES WORK
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>https://bidibo.xyz/technology</loc>
<lastmod>2025-05-10</lastmod>
<changefreq>weekly</changefreq>
</url>
<url>
<loc>https://www.bidibo.xyz/science</loc>
<lastmod>2025-05-12</lastmod>
<changefreq>daily</changefreq>
</url>
</urlset>
Submitting your sitemap to search engines like Google Search Console ensures
faster and more accurate indexing.
When you search for a term, search engines don’t just return random pages.
Instead, they use complex ranking algorithms that consider hundreds of
factors to deliver the most relevant and useful results.
• Content relevance: Does the page contain the keywords and context
related to your search?
• Backlinks: How many other trustworthy sites link to this page? For
example, apple.com likely has millions of backlinks, indicating authority.
• Page quality: How well-written, comprehensive, and trustworthy is the
content?
• User experience: Fast load times, mobile-friendliness, and secure con-
nections (HTTPS).
• Freshness: Recently updated pages may rank higher for trending topics.
• Domain authority: Established domains generally have higher rankings.
87
INTERNET & PROTOCOLS
To help website owners monitor and improve their sites’ search performance,
major search engines provide free tools:
• Google Search Console: Offers data about search traffic, indexing status,
mobile usability, security issues, and allows submitting sitemaps.
• Bing Webmaster Tools: Similar features for Microsoft’s search engine.
• Yandex Webmaster: For the Russian search engine Yandex.
Beyond robots.txt, individual pages can use meta tags to control how search
engines treat them:
Meta Tag Purpose Example:
88
HOW SEARCH ENGINES WORK
By using these, you can control what parts of your website are visible to search
engines and how they crawl your links.
When you update or add new content, you can send a ping to search engines,
notifying them that your site has changed and prompting faster crawling.
• Tools like Ping-o-Matic or direct API requests can send these pings.
• Many Content Management Systems (CMS) like WordPress automate this
process.
SEO is the practice of optimizing your website to rank higher in search engine
results. It includes:
• Keyword research: Finding words people use to search for your content.
• On-page SEO: Using keywords naturally in titles, headings, and content.
• Technical SEO: Ensuring fast load times, mobile-friendly design, and
secure HTTPS connections.
• Link building: Gaining backlinks from reputable sites.
• User experience: Creating easy navigation, clean design, and helpful
content.
89
INTERNET & PROTOCOLS
• Surface Web: The part indexed by standard search engines. This includes
most blogs, news sites like bidibo.xyz, and company websites.
• Deep Web: Content not indexed because it’s behind passwords, paywalls,
or not linked publicly (e.g., email inboxes, private databases).
• Dark Web: Sites using .onion addresses accessible only through Tor
browser. Dark web search engines like Ahmia.fi and Torch index some of
these sites but have limited scope.
Unlike Google, dark web search engines cannot crawl all sites due to the
secretive and ephemeral nature of .onion sites. Some key ones include:
• Ahmia.fi: Filters out illegal content and indexes .onion sites with trans-
parency.
• Torch: One of the oldest dark web search engines, indexes many forums
and marketplaces.
• The Hidden Wiki: A directory (not a search engine) listing popular .onion
sites by category.
90
HOW SEARCH ENGINES WORK
Summary
Next, we will explore Domains, ICANN, and How Websites Get Online —
diving into how domain names are registered, how DNS works, and how you
can even set up your own server.
91
15
Introduction
Every time you type a web address like apple.com, bidibo.xyz, or nabilbinbi
llal.github.io, you’re using a domain name—a human-readable string that
connects you to websites hosted somewhere in the world. But what exactly is
a domain name? How are they registered, who controls them, and how does
typing a few words into a browser open a fully loaded website?
To understand how websites get online, we must look at three major pieces of
internet infrastructure:
• Domain names
• IP addresses
• Hosting and DNS systems
But before we get to the technical part, let’s explore how this system came to
be.
92
DOMAINS, ICANN, AND HOW WEBSITES GET ONLINE
At the time, websites didn’t have names. They were accessed by numeric IP
addresses (e.g., 192.168.1.1 or 216.58.217.46). This system was neither user-
friendly nor scalable.
In 1985, the first domain names were registered. At that time, domain
registration was free because the internet was primarily for academic and
military use.
93
INTERNET & PROTOCOLS
Since the internet was invented as a U.S. government project, much of its early
infrastructure—both physical and logical—was developed and controlled in
the United States.
The first root servers, registries, and even domain governance authorities
were located in the U.S. As a result, American organizations and policies have
historically dominated internet regulation, although international pressure
has since pushed for more global oversight.
Though based in the U.S., ICANN includes stakeholders from around the
world—governments, technical experts, academics, private sector represen-
tatives, and civil society.
94
DOMAINS, ICANN, AND HOW WEBSITES GET ONLINE
www.bidibo.xyz
• www – Subdomain
• bidibo – Second-level domain (owned by you)
• .xyz – Top-Level Domain (TLD), managed by ICANN-accredited registry
95
INTERNET & PROTOCOLS
Example:
If you want a custom top-level domain, such as .nabil, the process is signifi-
cantly more complex and costly:
1. Apply to ICANN during a new gTLD application round (not always open).
2. Meet technical, legal, and financial requirements.
3. Pay the application fee (usually over $185,000 USD).
4. Operate as a registry or assign the responsibility to a technical backend
provider.
96
DOMAINS, ICANN, AND HOW WEBSITES GET ONLINE
• .google
• .apple
• .microsoft
• .bmw
97
INTERNET & PROTOCOLS
Summary
What’s Next
In the next chapter, we’ll explore Turning Your Computer into a Server—you’ll
learn how a regular PC can host websites, how web servers work (like Apache
and Nginx), and what it takes to self-host a project from your own home or
office.
98
16
This chapter will demystify what a server is, how you can turn your personal
machine into one, and how the internet treats servers. You’ll explore how real
websites can be served from your bedroom, and what it takes to make them
accessible to others—or keep them private for testing.
• You open Chrome and type bidibo.xyz → your browser (client) sends a
request.
99
INTERNET & PROTOCOLS
• A web server like Apache, Nginx, or a Node.js app receives that request,
processes it, and sends back HTML, CSS, JS, images, etc.
Servers don’t need to be expensive. They don’t need to be in a data center. Any
internet-connected device can act as a server—even your old dusty laptop.
Basic Requirements:
• A computer (Windows/macOS/Linux)
• Internet connection
• Static IP or dynamic DNS (for public access)
• Installed server software (Apache, Nginx, etc.)
100
TURNING YOUR COMPUTER INTO A SERVER
Steps:
C:\xampp\htdocs\
http://localhost/
101
INTERNET & PROTOCOLS
/var/www/html
Visit http://localhost/
Nginx Alternative:
102
TURNING YOUR COMPUTER INTO A SERVER
// server.js
const http = require('http');
http.createServer((req, res) => {
res.write("Hello from Node!");
res.end();
}).listen(3000);
Run:
node server.js
Visit http://localhost:3000
By default, localhost works only on your machine. To access your server from
other devices:
• Windows: ipconfig
• macOS/Linux: ifconfig or ip a
http://<your_local_IP>:<port>
Example:
http://192.168.0.101:8000
103
INTERNET & PROTOCOLS
104
TURNING YOUR COMPUTER INTO A SERVER
• Use Express.js or Flask to build internal web tools for your college or group.
If you have a Raspberry Pi, you can turn it into a 24/7 mini web server:
• Install Raspbian
• Install Apache/Nginx or use Node.js
• Deploy your website
• Low power, always on!
Security Basics
105
INTERNET & PROTOCOLS
Summary
Your computer isn’t just a device to browse the internet—it can be the internet.
By turning your PC into a server, you learn what actually happens when you
visit a website. You go behind the scenes, beyond front-end design, into the
gears of how content travels from server to browser.
Whether you’re building the next version of Bidibo, making a private blog, or
just geeking out with a Raspberry Pi, hosting locally gives you power, control,
and skills that every tech enthusiast should have.
Next Chapter
In Chapter 17: Everyday Internet Tasks You Should Know, we’ll explore
essential skills like using WHOIS, checking if a website is down, tracking IPs,
setting up a VPN, using terminal network commands (ping, traceroute), and
more internet “hacks” that make you smarter, faster, and safer online.
106
17
The internet isn’t just for browsing Facebook or watching YouTube. Under
the surface, there’s a vast ocean of tools, protocols, diagnostics, and tasks
that are often used by IT experts, cybersecurity professionals, developers, and
even curious students.
In this chapter, you’ll learn not only how to explore the internet deeper but
also how to understand, test, and manipulate the very structure of it — all
while using tools already available on your system or via free resources online.
107
INTERNET & PROTOCOLS
ping google.com
Try This:
ping bidibo.xyz
traceroute apple.com
Try:
tracert nabilbinbillal.github.io
108
EVERYDAY INTERNET TASKS YOU SHOULD KNOW
whois example.com
Reveals:
• Registrar info
• Contact email
• Name servers
• Domain creation and expiration
• https://www.ssllabs.com/ssltest/
• Browser padlock → View Certificate
Learn:
• https://downforeveryoneorjustme.com
• https://isitdownrightnow.com
109
INTERNET & PROTOCOLS
nslookup bidibo.xyz
or
dig apple.com
Gives you:
nmap 192.168.0.1
Reveals:
• Open ports
• Services running
• Security issues
Use for:
110
EVERYDAY INTERNET TASKS YOU SHOULD KNOW
8. Check IP Geolocation
Try:
• https://iplocation.net
• https://whatismyipaddress.com
Find:
• Country, city
• ISP
• Type of connection (VPN/proxy/ISP)
https://web.archive.org/web/*/apple.com
Use:
Use when you’ve changed domain DNS and want to check if it’s updated
globally.
Try:
111
INTERNET & PROTOCOLS
• https://dnschecker.org
Services:
• bitly.com
• tinyurl.com
But remember:
• HTML structure
• Scripts
• Metadata (like description, keywords, social tags)
112
EVERYDAY INTERNET TASKS YOU SHOULD KNOW
• Pings a domain
• Checks SSL
• Does WHOIS
• Checks DNS records
• Input a URL
• Use whois, SSL Labs, archive, and other tools to check credibility.
• Check your IP
• Track which cookies websites are placing
• Use Privacy Badger and uBlock Origin in your browser
113
INTERNET & PROTOCOLS
The tools in this chapter may seem small—but together, they give you
superpowers. You can:
• Debug servers
• Trace hackers
• Explore unknown websites
• Audit domains
• Understand how networks behave in real time
Learning these not only makes you smarter — it makes you safer. You’re no
longer just a browser tab opener. You’re now a navigator of the digital sea.
114
18
• Static websites.
• Little to no interaction.
• Examples: Early blogs, Geocities pages, Yahoo! directory.
115
INTERNET & PROTOCOLS
Example: Instead of logging into Spotify with Google, in Web 3.0 you
might log in with a wallet you control. Your playlists and data belong to
you, not to Spotify or Google.
What is Decentralization?
Instead of trusting one company or server, data is spread across many nodes,
making systems harder to censor, hack, or manipulate.
Blockchain in Action:
116
THE FUTURE OF THE INTERNET
Examples:
What’s next?
Countries like the USA, China, and the EU are racing to build the world’s first
large-scale quantum internet. This could become a reality in the next 10–20
years.
117
INTERNET & PROTOCOLS
Starlink by SpaceX:
Other projects:
The vision: Every human on Earth will have access to fast, uncensored
internet — even in the middle of the Sahara.
By 2030, experts predict over 100 billion connected devices. Your daily life
could look like:
The internet’s future won’t just be shaped by tech—it will be shaped by people.
Key questions:
118
THE FUTURE OF THE INTERNET
Virtual reality (VR) and augmented reality (AR) will allow people to:
Meta (formerly Facebook), Apple, Google, and startups are investing billions
into this new layer of the internet.
️ Key threats:
Solutions:
• Stronger education.
• AI regulation and digital literacy.
• Transparent algorithms.
119
INTERNET & PROTOCOLS
To stay ahead:
Final Thoughts
You are not just a user of the internet—you can be a builder of its
future.
120
19
But how can all these devices connect, communicate, and process such vast
amounts of data? The answer lies in another powerful innovation: Cloud
Computing.
Together, IoT and cloud computing are reshaping industries, homes, health-
care, cities — and even how we think.
121
INTERNET & PROTOCOLS
The Internet of Things is a term used to describe physical objects that are
connected to the internet and are capable of collecting, sharing, and receiving
data.
Core Concept:
Imagine if everyday objects like refrigerators, shoes, cars, and traffic lights
could talk to each other. IoT makes this possible.
122
THE INTERNET OF THINGS (IOT) AND CLOUD COMPUTING
123
INTERNET & PROTOCOLS
Service Models:
Benefits of Cloud:
124
THE INTERNET OF THINGS (IOT) AND CLOUD COMPUTING
• Transferred securely,
• Processed intelligently,
• Accessed from anywhere,
• And stored for long-term analytics.
Example: A smart city uses IoT sensors for traffic, parking, air quality.
The data is sent to a centralized cloud system for analytics. The insights
control lights, alert services, or inform citizens.
• Transportation
• Utilities
• Healthcare
• Waste management
• Law enforcement
Real Examples:
125
INTERNET & PROTOCOLS
Security Risks:
• Many IoT devices are poorly secured (weak passwords, unpatched soft-
ware).
• Common attack: Mirai Botnet — hijacked smart cameras to launch
massive DDoS attacks.
Privacy Concerns:
Scalability Issues:
Device Interoperability:
Edge Computing:
126
THE INTERNET OF THINGS (IOT) AND CLOUD COMPUTING
AI + IoT:
Blockchain + IoT:
Prediction: IoT and Cloud will soon manage everything from cities to
space missions.
Job Roles:
• IoT Developer
• Embedded Systems Engineer
• Cloud Solutions Architect
• DevOps Engineer
• Cloud Security Analyst
• Data Engineer (for IoT analytics)
Skills to Learn:
127
INTERNET & PROTOCOLS
Beginner:
Intermediate:
Advanced:
Conclusion
The Internet of Things and Cloud Computing are not just buzzwords —
they are the core of our digital future. Together, they enable smarter homes,
smarter cities, smarter industries, and smarter living.
128
THE INTERNET OF THINGS (IOT) AND CLOUD COMPUTING
Understanding this technology equips you not only for modern life but also
for an exciting future where everything is connected — and everyone is
empowered.
129
20
Introduction
Data transfer methods are essential to how the internet, communications,
and digital technologies work. From wired connections like Ethernet cables
to wireless technologies like Wi-Fi, cellular networks, and even deep space
communication, understanding these systems provides insight into how our
world stays connected.
Wired connections use physical cables to transmit data signals, often electrical
or optical. They are reliable, secure, and typically offer higher speeds and lower
latency compared to wireless.
130
DATA TRANSFER METHODS – WIRED, WIRELESS, AND BEYOND
Ethernet is the most common wired networking technology for local area
networks (LANs). Ethernet cables are classified into categories (Cat) based on
their performance and speed capabilities:
Why Categorized?
Categories indicate cable construction quality, shielding, and max frequency,
directly affecting speed and range. Higher categories reduce interference and
support faster data rates over longer distances.
Fiber optics use light pulses through glass or plastic fibers, providing ex-
tremely fast data transmission over long distances without electromagnetic
interference.
• Single-mode fiber: For long distances (up to 100+ km), uses laser light.
• Multi-mode fiber: For shorter distances (up to 2 km), uses LED light.
Fiber speeds range from 1 Gbps to 400 Gbps or more with modern technology.
131
INTERNET & PROTOCOLS
Coaxial Cables
Used in cable TV and some internet services, coaxial cables consist of a central
conductor surrounded by insulation and shielding, allowing transmission of
radio-frequency signals with minimal interference.
Key Point: Higher frequencies can carry more data but travel shorter distances
and require more precise antennas.
132
DATA TRANSFER METHODS – WIRED, WIRELESS, AND BEYOND
• IEEE 802.11 (Wi-Fi): Wireless local area network standard (2.4 GHz, 5
GHz, and 6 GHz bands).
• IEEE 802.15 (Bluetooth): Short-range wireless personal area networks.
• IEEE 802.16 (WiMAX): Wireless broadband for metropolitan areas.
• IEEE 802.3 (Ethernet): Wired networking.
Cellular networks provide mobile data and voice coverage using a system of
towers and cells covering geographic areas.
Network Layout
• The coverage area is divided into hexagonal cells, each with a base station
(tower).
• Cells use different frequencies to avoid interference.
• Phones connect to the nearest tower and switch cells seamlessly during
movement (handover).
Components
133
INTERNET & PROTOCOLS
communication.
• Bluetooth: Short-range (10 meters), 2.4 GHz band, used for device pairing
and data exchange.
• Wi-Fi: Local wireless internet (up to several hundred meters), uses 2.4
GHz and 5 GHz bands, newer standards add 6 GHz.
• WiMAX: Broadband over longer distances (several kilometers), used in
some rural broadband deployments.
• NFC (Near Field Communication): Very short range (<10 cm), used in
contactless payments.
134
DATA TRANSFER METHODS – WIRED, WIRELESS, AND BEYOND
DSN Features
135
INTERNET & PROTOCOLS
Summary
Data transfer methods are varied and complex, ranging from physical cables
(Ethernet, fiber optics) categorized by speed and shielding, to wireless
technologies spanning radio frequencies regulated globally. Cellular networks
connect billions of devices, supported by SIM cards and towers, while NASA’s
Deep Space Network extends human communication to other planets. These
systems combined form the backbone of the modern connected world.
136
21
In the 21st century, the boundaries between biology and technology have
blurred, creating a dynamic synergy that is transforming science and society.
Biotechnology and genetics, once confined to laboratory benches, now lever-
age the power of digital tools and the internet to accelerate discoveries and
applications. From decoding the human genome to developing personalized
cancer treatments, this convergence is reshaping medicine, agriculture, and
even security. The internet, in particular, has become the backbone of modern
scientific innovation, enabling global collaboration, instant data sharing,
and access to computational resources that were unimaginable just a few
decades ago. This chapter explores the fascinating interplay of biotechnology,
genetics, and digital technology, diving into cutting-edge fields like genetic
engineering, biometrics, and cryptography, and examining how the internet
has revolutionized scientific progress.
137
INTERNET & PROTOCOLS
138
BIOTECHNOLOGY, GENETICS, AND THE INTERNET’S ROLE IN...
139
INTERNET & PROTOCOLS
• Infrared (IR) Sensors: IR-based systems, like Apple’s Face ID, use
infrared light to create a heat map of a face. This makes it nearly impossible
to fool the system with photographs or masks, as IR detects the unique
thermal signature of living tissue.
• 3D Facial Recognition: Unlike 2D systems that rely on flat images, 3D
recognition uses depth-sensing cameras to map the contours of a face.
For example, Face ID projects 30,000 infrared dots onto a user’s face to
create a 3D model, ensuring high precision even in low-light conditions.
140
BIOTECHNOLOGY, GENETICS, AND THE INTERNET’S ROLE IN...
The iris, the colored ring around the pupil, is one of the most unique identifiers
in the human body. Its intricate patterns, formed during fetal development,
are distinct even between identical twins and remain stable throughout life.
Iris scanning captures these patterns using high-resolution cameras and
near-infrared light, offering a highly secure biometric method.
141
INTERNET & PROTOCOLS
2. Pattern Analysis: The system extracts features like ridges, furrows, and
crypts in the iris, converting them into a digital template (typically a
512-bit code).
3. Matching: The template is compared against a database for identification
or verification.
• Uniqueness: The iris has over 200 unique features, far more than
fingerprints (about 40–60 points).
• Stability: Unlike fingerprints, which can wear down, iris patterns remain
unchanged over time.
• Non-Invasive: The process requires no physical contact, making it
hygienic and user-friendly.
Applications
Challenges
While highly secure, iris scanning faces challenges like high equipment costs
and the need for precise alignment during scanning. Privacy concerns also
arise, as iris data could be misused if not properly protected.
142
BIOTECHNOLOGY, GENETICS, AND THE INTERNET’S ROLE IN...
Encryption Basics
• Symmetric Encryption: Uses a single key for both encryption and decryp-
tion (e.g., AES-256).
• Asymmetric Encryption: Uses a public key for encryption and a private
key for decryption (e.g., RSA).
• DNA as a Key: DNA sequences, with their vast complexity, can serve as
unique cryptographic keys. A single gram of DNA can store up to 215
petabytes of data, making it an intriguing medium for secure storage.
• Biometric Templates: Facial and iris data can be hashed into crypto-
graphic keys for authentication.
143
INTERNET & PROTOCOLS
The internet has democratized science, enabling smaller labs and even citizen
scientists to contribute to breakthroughs.
144
BIOTECHNOLOGY, GENETICS, AND THE INTERNET’S ROLE IN...
Before the advent of the Portable Document Format (PDF), sharing scientific
papers was a logistical challenge. Documents often lost formatting when
shared across different systems, and physical copies were slow to distribute.
PDFs, introduced by Adobe in 1993, revolutionized this process by offering:
Today, PDFs remain the gold standard for publishing research papers, en-
suring that complex scientific visuals—like protein structures or genomic
maps—are accurately represented.
• Reliability: Unlike URLs, which can break, DOIs are managed by organiza-
tions like CrossRef and DataCite, ensuring long-term access.
• Citation Tracking: DOIs make it easy to track how often a paper is cited,
aiding in research impact assessment.
• Ease of Sharing: Researchers can share DOIs to direct colleagues to precise
resources.
145
INTERNET & PROTOCOLS
These trends highlight the need for responsible innovation to balance benefits
with societal implications.
To dive deeper into biotechnology and digital technology, try these hands-on
projects:
• DNA Sequence Viewer: Build a simple web tool using JavaScript and
libraries like BioJS to visualize DNA sequences. Display a sequence in
a browser and highlight specific genes.
• Explore Genomic Databases: Visit NCBI GenBank or Ensembl to down-
load a sample genome (e.g., E. coli) and analyze it using free bioinformatics
146
BIOTECHNOLOGY, GENETICS, AND THE INTERNET’S ROLE IN...
These projects bridge theory and practice, making the concepts in this chapter
tangible and exciting.
Conclusion
The fusion of biotechnology, genetics, and digital technology is one of the most
transformative forces in modern science. From editing genes with CRISPR to
securing identities with facial and iris recognition, these advancements are
reshaping our world. The internet has been a catalyst, connecting researchers,
democratizing data, and enabling rapid innovation. As we look to the future,
the challenge lies in harnessing these technologies ethically and equitably,
ensuring they benefit humanity while safeguarding privacy and trust. By
exploring the tools and ideas in this chapter, you can join the next wave of
scientific pioneers.
147
22
148
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
Defining AI
Types of AI
- Narrow AI: Specialized for specific tasks, like Google’s search algorithm or
Netflix’s recommendation system. Most current AI is narrow.
- General AI: Hypothetical AI with human-like intelligence across diverse
tasks. General AI remains a future goal.
- Superintelligent AI: A speculative concept where AI surpasses human
intelligence, raising ethical concerns.
149
INTERNET & PROTOCOLS
For example, a facial recognition system might use millions of labeled face
images from online databases.
150
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
- Supervised Learning: Uses labeled data (e.g., predicting house prices from
features like size and location).
- Unsupervised Learning: Finds patterns in unlabeled data (e.g., clustering
customers by behavior).
- Reinforcement Learning: Learns through trial and error (e.g., training a
robot to navigate obstacles).
Step 4: Training
- Loss Function: Measures prediction errors (e.g., mean squared error for
regression).
151
INTERNET & PROTOCOLS
Step 5: Evaluation
The model is tested on unseen data to assess performance using metrics like
accuracy, precision, or recall.
Once trained, the model makes predictions on new data. For example, a spam
filter classifies emails as “spam” or “not spam” in real time.
152
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
- w : Weight (slope).
- b : Bias (intercept).
- x : Input feature.
- y : Predicted output.
How AI Predicts
153
INTERNET & PROTOCOLS
import numpy as np
import matplotlib.pyplot as plt
Initialize parameters
w = 0 Weight
b = 0 Bias
learning_rate = 0.01
epochs = 1000
Gradient descent
for _ in range(epochs):
Forward pass: predict y
y_pred = w * X + b
Compute gradients
dw = (1/len(X)) * np.sum((y_pred - y) * X)
db = (1/len(X)) * np.sum(y_pred - y)
Update parameters
w -= learning_rate * dw
b -= learning_rate * db
154
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
Explanation
- Data: We use synthetic data where hours studied (X) correlate with test scores
(y).
- Model: The linear equation y = wx + b predicts scores.
- Training: Gradient descent adjusts w and b over 1000 iterations.
- NumPy: Handles array operations efficiently.
- Output: The model learns w approx 5 and b approx 45 , predicting a score
of ~90 for 9 hours.
155
INTERNET & PROTOCOLS
Early Foundations
The concept of AI dates back to ancient myths, but formal development began
in the 20th century:
- 1943:
Warren McCulloch and Walter Pitts modeled artificial neurons, laying the
groundwork for neural networks.
- 1950:
Alan Turing proposed the Turing Test to evaluate machine intelligence and
explored AI in his paper Computing Machinery and Intelligence.
- 1956:
The term “Artificial Intelligence” was coined by John McCarthy at the
Dartmouth Conference, marking AI’s birth as a field. McCarthy, along with
Marvin Minsky, Herbert Simon, and Allen Newell, pioneered early AI research.
Milestones
- 1960s:
Early AI systems like the General Problem Solver tackled simple tasks.
- 1980s:
Expert Systems used rule-based logic for medical diagnosis and other
applications.
- 1997:
IBM’s Deep Blue defeated chess champion Garry Kasparov.
- 2012:
The AlexNet neural network revolutionized image recognition, sparking the
deep learning boom.
- 2016:
Google’s AlphaGo defeated Go champion Lee Sedol, showcasing reinforce-
156
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
ment learning.
Key Contributors
- Data Access: Platforms like Kaggle and Google Dataset Search provide diverse
datasets.
- Collaboration: Open-source communities on GitHub share code and
models.
- Cloud Computing: AWS, Azure, and Google Cloud offer scalable infras-
tructure for training large models.
- APIs and Services: Tools like Google Vision API and OpenAI’s GPT models
make AI accessible to developers.
- Crowdsourcing: Projects like ImageNet relied on internet users to label
millions of images.
For example, training a model like GPT-3 requires petabytes of text data from
157
INTERNET & PROTOCOLS
the web and massive computational resources, only feasible through internet
infrastructure.
8. The Future of AI
Advancements
- General AI: Researchers aim for systems with human-like versatility, though
this is decades away.
- Explainable AI: Making AI decisions transparent to build trust.
- Edge AI: Running AI on devices like smartphones to reduce latency and
privacy risks.
- AI in Healthcare: Predicting diseases and personalizing treatments (e.g.,
AI-driven cancer detection).
- Sustainability: AI optimizing energy use in smart grids and climate
modeling.
Challenges
158
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
The potential for AI to cause harm is a critical concern, debated by experts and
ethicists. Here’s a detailed analysis:
Potential Risks
2. Privacy Violations:
- AI-powered surveillance, like facial recognition, can erode personal
privacy if misused by governments or corporations.
- Mitigation: Strict data protection laws (e.g., GDPR) and anonymization
techniques.
3. Autonomous Weapons:
- AI in military applications, like drones, raises fears of “killer robots”
making lethal decisions without human oversight.
- Mitigation: International treaties to ban fully autonomous weapons are
under discussion.
4. Existential Risk:
- Some, like Elon Musk, warn that superintelligent AI could outsmart
humans and act against our interests if not aligned with human values.
- Mitigation: Research into AI alignment and safety, led by organizations
159
INTERNET & PROTOCOLS
5. Economic Disruption:
- Mass automation could lead to unemployment in sectors like retail and
logistics.
- Mitigation: Reskilling programs and universal basic income are proposed
solutions.
6. Misinformation:
- AI-generated deepfakes and fake news can manipulate public opinion.
- Mitigation: Detection tools and media literacy campaigns.
While risks exist, AI’s harm potential depends on how it’s developed and
regulated:
- Human Oversight: Ensuring humans remain in the loop for critical decisions.
- Ethical Guidelines: Frameworks like the EU’s AI Act promote trustworthy
AI.
- Transparency: Open-source AI fosters scrutiny and accountability.
160
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
- Build a Classifier: Use Python and scikit-learn to classify iris flowers based
on petal measurements.
- Image Recognition: Experiment with TensorFlow to recognize objects in
photos.
- Chatbot: Create a simple chatbot using Python and NLTK.
- Gradient Descent Demo: Modify the linear regression code above to predict
different data (e.g., car prices).
python
import numpy as np
for _ in range(self.n_epochs):
for idx, x_i in enumerate(X):
linear_output = np.dot(x_i, self.weights) + self.bias
y_pred = 1 if linear_output >= 0 else 0
161
INTERNET & PROTOCOLS
Update rule
update = self.lr * (y[idx] - y_pred)
self.weights += update * x_i
self.bias += update
perceptron = Perceptron()
perceptron.fit(X, y)
predictions = perceptron.predict(X)
print("Predictions:", predictions)
Explanation
Conclusion
162
ARTIFICIAL INTELLIGENCE AND MACHINE LEARNING
revolutionizing healthcare, education, and more—it also poses risks like bias,
privacy loss, and existential threats. Responsible development, guided by
ethics and regulation, is crucial to ensure AI benefits humanity. By exploring
the projects and concepts in this chapter, you can join the AI revolution and
shape its future.
163
23
164
THE ROLE OF APIS AND WEB SERVICES IN MODERN INTERNET
Defining APIs
An API is a set of rules and tools that allows different software applications to
communicate with each other. Think of an API as a waiter in a restaurant: you
(the client) place an order (a request), the waiter relays it to the kitchen (the
server), and brings back your food (the response). APIs define how requests
and responses should be structured, enabling interoperability.
A web service is a type of API designed to operate over the internet, typically
using standard protocols like HTTP. Web services allow applications to
exchange data or perform tasks across networks. Unlike APIs, which can
operate locally or use various protocols, web services are inherently web-
based and often rely on formats like XML or JSON.
Types of APIs
- REST (Representational State Transfer): The most common API type, using
HTTP methods (GET, POST, PUT, DELETE) to interact with resources. REST
APIs are lightweight and scalable, ideal for web applications.
- SOAP (Simple Object Access Protocol): A protocol using XML for structured
data exchange, often in enterprise systems requiring high security.
- GraphQL: A query language for APIs, allowing clients to request specific
data, reducing over- or under-fetching.
- gRPC: A high-performance framework using HTTP/2, suited for microser-
vices.
165
INTERNET & PROTOCOLS
- RESTful Web Services: Follow REST principles, widely used for public APIs
(e.g., Twitter API).
- SOAP Web Services: Common in legacy systems, like banking or CRM
platforms.
- XML-RPC and JSON-RPC: Simplified protocols for remote procedure calls.
166
THE ROLE OF APIS AND WEB SERVICES IN MODERN INTERNET
GET https://api.weather.com/v3/forecast?city=London&apiKey=12345
- Response:
json
{
"city": "London",
"forecast": [
{"date": "2025-06-11", "temp": 18, "condition": "cloudy"},
{"date": "2025-06-12", "temp": 20, "condition": "sunny"}
]
}
167
INTERNET & PROTOCOLS
Real-World Examples
- Social Media: The Twitter API lets developers analyze tweets or automate
posts.
- E-commerce: Shopify’s API enables custom storefronts or inventory
management.
- IoT: APIs connect smart devices, like Nest thermostats, to mobile apps.
- Finance: Plaid’s API links bank accounts to apps like Venmo.
To illustrate API usage, let’s write a Python script using the ‘requests‘ library
to fetch data from a public API (OpenWeatherMap). This example retrieves
the current weather for a specified city.
import requests
168
THE ROLE OF APIS AND WEB SERVICES IN MODERN INTERNET
API configuration
API_KEY = "your_api_key_here" Replace with your OpenWeatherMap
API key
BASE_URL = "http://api.openweathermap.org/data/2.5/weather"
city = "London"
Example output:
Explanation
169
INTERNET & PROTOCOLS
- Request: The script sends a GET request to the API with the city and API
key.
- Response: The API returns JSON data, which the script parses to extract
temperature and conditions.
- Error Handling: Checks for HTTP errors (e.g., 401 for invalid API key).
This code demonstrates how APIs enable developers to integrate external data
into applications.
Common Threats
170
THE ROLE OF APIS AND WEB SERVICES IN MODERN INTERNET
passwords.
Best Practices
For example, Twitter’s API uses OAuth and rate limiting to secure and stabilize
its platform.
- Cloud Infrastructure: AWS, Azure, and Google Cloud host scalable APIs,
reducing server management overhead.
- API Marketplaces: Platforms like RapidAPI and Postman offer thousands
of APIs for developers.
- Open Standards: HTTP, JSON, and REST ensure universal compatibility.
- Community Collaboration: GitHub hosts API documentation and SDKs,
fostering innovation.
171
INTERNET & PROTOCOLS
- Versioning: Updating APIs without breaking existing clients (e.g., using ‘/v1/‘
vs. ‘/v2/‘).
- Documentation: Poor documentation frustrates developers, reducing
adoption.
- Performance: High-latency APIs degrade user experience.
- Compatibility: Ensuring APIs work across diverse devices and platforms.
- Serverless Computing: AWS Lambda and Azure Functions allow APIs to run
without managing servers, reducing costs.
- GraphQL Adoption: Its flexibility is replacing REST in complex applica-
tions, like GitHub’s API.
- AI-Driven APIs: APIs like OpenAI’s GPT-4 enable developers to embed AI
capabilities, such as chatbots or text analysis.
- Event-Driven Architectures: APIs using WebSockets or Kafka support
real-time applications, like live sports updates.
- Decentralized APIs: Blockchain-based APIs enable secure, trustless data
sharing, as seen in DeFi platforms.
- IoT Integration: APIs will connect billions of smart devices, from wear-
ables to smart cities.
These trends point to a future where APIs are more dynamic, intelligent, and
172
THE ROLE OF APIS AND WEB SERVICES IN MODERN INTERNET
ubiquitous.
Here’s a bonus Python script to fetch and display GitHub repository details
using the GitHub API:
python
import requests
Check response
if response.status_code == 200:
repos = response.json()
for repo in repos[:5]: Limit to first 5 repos
173
INTERNET & PROTOCOLS
name = repo["name"]
stars = repo["stargazers_count"]
print(f"Repo: {name}, Stars: {stars}")
else:
print(f"Error: {response.status_code} -
{response.json().get('message', 'Unknown error')}")
Example output:
Explanation
Conclusion
APIs and web services are the invisible engines of the modern internet,
enabling seamless integration and innovation across applications. From REST-
ful APIs powering social media to GraphQL driving dynamic queries, these
technologies connect the digital world. The internet’s infrastructure—cloud
computing, open standards, and global reach—has made APIs ubiquitous,
while security practices ensure their reliability. As serverless architectures,
AI, and IoT reshape the landscape, APIs will remain central to technological
progress. By exploring the projects and concepts in this chapter, you can
harness APIs to build the next generation of internet applications.
174
24
175
INTERNET & PROTOCOLS
Definition
176
CLOUD COMPUTING IN DEPTH
Service Models
Architecture Overview
1. Physical Layer: Data centers with servers, storage devices, and network-
ing equipment.
2. Virtualization Layer: Hypervisors (e.g., VMware, KVM) create virtual
machines (VMs) or containers to abstract physical hardware.
3. Service Layer: APIs and dashboards provide access to IaaS, PaaS, or SaaS
offerings.
4. Network Layer: High-speed internet connects users to cloud resources,
often through content delivery networks (CDNs).
177
INTERNET & PROTOCOLS
Key Components
Workflow Example
- Amazon Web Services (AWS): The largest provider, offering over 200
services, including EC2 (compute), S3 (storage), and Lambda (serverless).
178
CLOUD COMPUTING IN DEPTH
Each provider offers unique strengths, but AWS leads with a 32% market share
(as of 2025).
To illustrate cloud computing, let’s create a Python script using the ‘boto3‘
library to upload and retrieve a file from AWS S3, a popular object storage
service.
import boto3
from botocore.exceptions import ClientError
AWS_ACCESS_KEY = "your_access_key"
AWS_SECRET_KEY = "your_secret_key"
BUCKET_NAME = "my-example-bucket"
FILE_NAME = "example.txt"
LOCAL_FILE = "example.txt"
Initialize S3 client
s3 = boto3.client(
179
INTERNET & PROTOCOLS
"s3",
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
Upload file to S3
try:
s3.upload_file(LOCAL_FILE, BUCKET_NAME, FILE_NAME)
print(f"Uploaded {FILE_NAME} to S3 bucket {BUCKET_NAME}")
except ClientError as e:
print(f"Error uploading file: {e}")
try:
s3.download_file(BUCKET_NAME, FILE_NAME, "downloaded_example.txt")
print(f"Downloaded {FILE_NAME} as downloaded_example.txt")
except ClientError as e:
print(f"Error downloading file: {e}")
Explanation
- Setup: Install ‘boto3‘ via ‘pip install boto3‘. Configure AWS credentials
(preferably using IAM roles for security).
- S3 Client: Connects to AWS S3 using access keys.
- Upload: Transfers a local file to an S3 bucket.
- Download: Retrieves the file from S3.
- Error Handling: Catches issues like invalid credentials or missing buckets.
180
CLOUD COMPUTING IN DEPTH
Real-World Applications
- Media and Entertainment: Netflix and Spotify use cloud storage and CDNs
for streaming.
- Healthcare: Cloud-based EHR systems (e.g., Epic on Azure) manage
patient data.
- AI and Machine Learning: GCP’s BigQuery processes petabytes of data
for analytics.
- E-commerce: Shopify leverages AWS for scalable storefronts.
- Gaming: Cloud servers power multiplayer games like Fortnite.
Security is paramount in the cloud due to sensitive data and shared resources.
181
INTERNET & PROTOCOLS
Security Mechanisms
Common Threats
Best Practices
For example, AWS’s shared responsibility model splits security duties: AWS
secures the infrastructure, while users secure their applications and data.
182
CLOUD COMPUTING IN DEPTH
The internet’s high-speed networks and protocols like HTTP/2 ensure seam-
less cloud access.
183
INTERNET & PROTOCOLS
- Static Website on S3: Host a simple HTML site on AWS S3 with CloudFront
for global access.
- Serverless API: Build a REST API using AWS Lambda and API Gateway.
- Cloud Database: Set up a PostgreSQL database on AWS RDS and query it
with Python.
- Cost Monitor: Write a script to track AWS usage costs using the Cost
184
CLOUD COMPUTING IN DEPTH
Explorer API.
python
import boto3
from botocore.exceptions import ClientError
AWS credentials
AWS_ACCESS_KEY = "your_access_key"
AWS_SECRET_KEY = "your_secret_key"
BUCKET_NAME = "my-example-bucket"
Initialize S3 client
s3 = boto3.client(
"s3",
aws_access_key_id=AWS_ACCESS_KEY,
aws_secret_access_key=AWS_SECRET_KEY
)
try:
response = s3.list_objects_v2(Bucket=BUCKET_NAME)
if "Contents" in response:
for obj in response["Contents"]:
print(f"Object: {obj['Key']}, Size: {obj['Size']} bytes")
else:
print(f"No objects found in bucket {BUCKET_NAME}")
except ClientError as e:
print(f"Error listing objects: {e}")
Explanation
185
INTERNET & PROTOCOLS
Conclusion
Cloud computing has redefined how we build, deploy, and scale technology,
offering unparalleled flexibility and power. From IaaS to SaaS, cloud services
enable everything from startups to global enterprises to innovate rapidly. The
internet’s global infrastructure makes this possible, while security practices
ensure trust. With trends like serverless, edge, and quantum computing, the
cloud’s future is bright and dynamic. By exploring the concepts and projects
in this chapter, you can harness cloud computing to create scalable, efficient,
and impactful applications.
186
25
187
INTERNET & PROTOCOLS
Early Beginnings
- 1990s: Bulletin Board Systems (BBS) and Usenet allowed users to post
messages and share files, laying the groundwork for online communities.
- 1997: SixDegrees.com, often considered the first social networking site,
enabled users to create profiles and connect with friends.
- 2003: MySpace popularized customizable profiles and music integration,
attracting millions of users.
- 2004: Facebook launched, initially for college students, revolutionizing
social networking with its clean interface and real-name policy.
188
SOCIAL MEDIA AND THE INTERNET
Architecture
1. Frontend: User interfaces built with HTML, CSS, and JavaScript frame-
works like React or Vue.js, optimized for web and mobile.
2. Backend: Servers handle requests, manage databases, and run algo-
rithms. Technologies include Node.js, Python (Django/Flask), and Java.
3. Databases: Store user data, posts, and interactions. NoSQL databases
(e.g., MongoDB) handle unstructured data, while SQL databases (e.g.,
PostgreSQL) manage structured data.
4. APIs: Enable communication between frontend, backend, and third-
party apps. REST or GraphQL APIs power features like posting or fetching
timelines.
5. Cloud Infrastructure: Platforms use AWS, Azure, or GCP for scalable stor-
age and computing. Content Delivery Networks (CDNs) like Cloudflare
reduce latency.
Key Components
189
INTERNET & PROTOCOLS
- Analytics: Track metrics like views, likes, and shares to optimize engage-
ment.
For example, the X API allows retrieving posts, posting updates, or analyzing
followers, using OAuth for secure access.
190
SOCIAL MEDIA AND THE INTERNET
Let’s create a Python script to fetch recent posts from a user on X using the
‘tweepy‘ library, demonstrating social media API interaction.
import tweepy
# Fetch posts
tweets = client.get_users_tweets(id=user_id, max_results=5)
# Print posts
for tweet in tweets.data:
print(f"Post: {tweet.text}\nPosted at: {tweet.created_at}\n")
191
INTERNET & PROTOCOLS
except tweepy.TweepyException as e:
print(f"Error: {e}")
Example output:
Post: Excited for the new tech conference! Posted at: 2025-06-10
12:34:56
Explanation
- Setup: Install ‘tweepy‘ via ‘pip install tweepy‘. Obtain X API credentials from
developer.x.com (requires a developer account).
- Authentication: Uses OAuth to securely connect to the X API.
- Request: Fetches the latest 5 posts from a specified user.
- Error Handling: Catches issues like invalid credentials or rate limits.
- Output: Displays post text and timestamps.
This script shows how social media APIs enable developers to build tools like
analytics dashboards or automated posters.
Positive Impacts
192
SOCIAL MEDIA AND THE INTERNET
Negative Impacts
Security Threats
193
INTERNET & PROTOCOLS
Privacy Concerns
- Data Collection: Platforms track user behavior for ads, often without clear
consent.
- Third-Party Access: Apps accessing social media accounts may misuse
data.
- Surveillance: Governments may monitor posts, raising free speech
concerns.
Best Practices
For example, X’s API requires OAuth tokens, ensuring secure access without
exposing credentials.
194
SOCIAL MEDIA AND THE INTERNET
ences.
- Cloud Computing: AWS and GCP host social media infrastructure, enabling
scalability.
- High-Speed Networks: 5G and fiber optics support video streaming and
live features.
- Open Standards: HTTP, WebSockets, and JSON ensure interoperability.
- Content Delivery: CDNs like Akamai cache media for faster access.
9. Ethical Challenges
- Content Moderation: Balancing free speech with harmful content (e.g., hate
speech, violence) is contentious. Platforms use AI and human moderators,
but biases persist.
- Algorithmic Bias: Recommendation systems may amplify divisive content,
as seen in YouTube’s radicalization concerns.
- Addiction: Features like infinite scroll exploit psychological triggers,
raising ethical questions.
- Monetization vs. User Welfare: Ad-driven models prioritize engagement,
sometimes at the cost of user mental health.
Ethical frameworks, like the EU’s Digital Services Act, aim to address these
issues, but global consensus is lacking.
195
INTERNET & PROTOCOLS
- Sentiment Analyzer: Use the X API to analyze post sentiment with Python’s
NLTK library.
- Auto-Poster: Schedule posts on X or Instagram using their APIs (requires
OAuth setup).
196
SOCIAL MEDIA AND THE INTERNET
- Trend Tracker: Fetch trending topics from X and visualize with Matplotlib.
- Photo Downloader: Download Instagram images using a third-party API
(e.g., Instaloader).
python
import tweepy
X API credentials
API_KEY = "your_api_key"
API_SECRET = "your_api_secret"
ACCESS_TOKEN = "your_access_token"
ACCESS_TOKEN_SECRET = "your_access_token_secret"
Authenticate
client = tweepy.Client(
consumer_key=API_KEY,
consumer_secret=API_SECRET,
access_token=ACCESS_TOKEN,
access_token_secret=ACCESS_TOKEN_SECRET
)
Example output:
197
INTERNET & PROTOCOLS
Explanation
Conclusion
198
26
199
INTERNET & PROTOCOLS
Definition
Key Principles
Components of Governance
200
INTERNET GOVERNANCE AND CYBER LAWS
These entities collaborate to maintain the internet’s stability, with the multi-
stakeholder model preventing any single group from dominating.
201
INTERNET & PROTOCOLS
1. Cybercrime:
4. Content Regulation:
202
INTERNET GOVERNANCE AND CYBER LAWS
Enforcement Mechanisms
203
INTERNET & PROTOCOLS
Under GDPR:
import requests
URL to analyze
url = "https://example.com"
204
INTERNET GOVERNANCE AND CYBER LAWS
"X-Frame-Options",
"X-Content-Type-Options",
"Strict-Transport-Security",
"Referrer-Policy"
]
try:
Send GET request
response = requests.get(url, timeout=5)
Check headers
print(f"Analyzing security headers for {url}\n")
for header in security_headers:
if header in response.headers:
print(f"{header}: {response.headers[header]}")
else:
print(f"{header}: Not present")
Check HTTPS
if response.url.startswith("https"):
print("\nHTTPS: Enabled")
else:
print("\nHTTPS: Not enabled (insecure)")
except requests.RequestException as e:
print(f"Error accessing {url}: {e}")
Example output:
Explanation
205
INTERNET & PROTOCOLS
206
INTERNET GOVERNANCE AND CYBER LAWS
Technical Challenges
Political Challenges
207
INTERNET & PROTOCOLS
9. Case Studies
1. GDPR Enforcement:
- In 2021, Amazon was fined €746 million for GDPR violations related to
targeted advertising, highlighting the law’s global impact.
- Lesson: Companies must prioritize user consent and transparency.
208
INTERNET GOVERNANCE AND CYBER LAWS
Engage with internet governance and cyber laws through these projects:
- DNS Lookup Tool: Write a Python script to resolve domain names using
‘socket‘ or ‘dnspython‘.
- WHOIS Query: Fetch domain registration details using the ‘python-whois‘
library.
- Cybersecurity Audit: Extend the security headers script to check for
additional vulnerabilities.
- Policy Analysis: Research a country’s cyber laws and compare them to
GDPR.
python
209
INTERNET & PROTOCOLS
import whois
# Domain to query
domain = "example.com"
try:
# Perform WHOIS lookup
w = whois.whois(domain)
Example output:
Domain: example.com
Registrar: RESERVED-InternetAssignedNumbersAuthority
Creation Date: 1995-08-14 04:00:00
Expiration Date: 2025-08-13 04:00:00
Name Servers: ['a.iana-servers.net', 'b.iana-servers.net']
Explanation
210
INTERNET GOVERNANCE AND CYBER LAWS
Conclusion
Internet governance and cyber laws form the backbone of a secure, equitable,
and innovative digital world. Organizations like ICANN and IETF ensure
technical stability, while laws like GDPR and the Budapest Convention protect
users and combat crime. The internet’s global nature amplifies both opportu-
nities and challenges, from cross-border enforcement to privacy debates. As
emerging technologies like AI and quantum computing reshape the landscape,
governance must evolve to balance freedom, security, and accessibility. By
exploring the tools and concepts in this chapter, you can engage with the
systems shaping the internet’s future.
211
27
The internet has evolved from static web pages to a dynamic, interconnected
ecosystem powering global communication, commerce, and innovation. As
we stand on the cusp of a new era, emerging technologies like 5G, Blockchain,
Decentralized Web (Web3), and Quantum Internet promise to redefine how we
interact with the digital world. These advancements, built on the internet’s
infrastructure, offer unprecedented speed, security, decentralization, and
computational power. This chapter provides an in-depth exploration of these
technologies, their technical foundations, applications, challenges, and future
potential, equipping readers to understand and engage with the internet’s
next frontier.
212
EMERGING INTERNET TECHNOLOGIES
What is 5G?
Technical Foundations
213
INTERNET & PROTOCOLS
Applications
Challenges
Future Outlook
214
EMERGING INTERNET TECHNOLOGIES
What is Blockchain?
Technical Foundations
- Structure:
- Blocks: Contain transaction data, a timestamp, and a cryptographic hash.
- Chain: Blocks are linked via hashes, ensuring immutability.
- Consensus Mechanisms:
- Proof of Work (PoW): Miners solve complex puzzles to validate transac-
tions (e.g., Bitcoin).
- Proof of Stake (PoS): Validators stake cryptocurrency to confirm transac-
tions (e.g., Ethereum 2.0), reducing energy use.
- Cryptography: Public-private key pairs secure transactions.
- Smart Contracts: Self-executing contracts coded on the blockchain (e.g.,
Ethereum), automating agreements.
- Decentralization: No single authority controls the network, enhancing
resilience.
215
INTERNET & PROTOCOLS
Applications
import hashlib
import time
import json
class Block:
def __init__(self, index, transactions, timestamp, previous_hash):
self.index = index
self.transactions = transactions
self.timestamp = timestamp
self.previous_hash = previous_hash
self.hash = self.calculate_hash()
def calculate_hash(self):
216
EMERGING INTERNET TECHNOLOGIES
block_string = json.dumps({
"index": self.index,
"transactions": self.transactions,
"timestamp": self.timestamp,
"previous_hash": self.previous_hash
}, sort_keys=True).encode()
return hashlib.sha256(block_string).hexdigest()
class Blockchain:
def __init__(self):
self.chain = [self.create_genesis_block()]
def create_genesis_block(self):
return Block(0, ["Genesis Block"], time.time(), "0")
def get_latest_block(self):
return self.chain[-1]
def is_chain_valid(self):
for i in range(1, len(self.chain)):
current = self.chain[i]
previous = self.chain[i-1]
if current.hash != current.calculate_hash():
return False
if current.previous_hash != previous.hash:
return False
return True
# Example usage
blockchain = Blockchain()
blockchain.add_block(["Alice pays Bob 10 BTC"])
217
INTERNET & PROTOCOLS
# Print blockchain
for block in blockchain.chain:
print(f"Block {block.index}")
print(f"Transactions: {block.transactions}")
print(f"Timestamp: {block.timestamp}")
print(f"Previous Hash: {block.previous_hash}")
print(f"Hash: {block.hash}\n")
# Validate chain
print("Is blockchain valid?", blockchain.is_chain_valid())
Explanation
- Setup: Uses ‘hashlib‘ for SHA-256 hashing and ‘json‘ for serialization.
- Block Class: Represents a block with an index, transactions, timestamp,
previous hash, and current hash.
- Blockchain Class: Manages the chain, starting with a genesis block.
- Functionality: Adds blocks and validates the chain’s integrity.
- Output: Displays block details and confirms validity.
Challenges
218
EMERGING INTERNET TECHNOLOGIES
in illegal transactions.
- Interoperability: Different blockchains (e.g., Ethereum, Solana) often
don’t communicate seamlessly.
Future Outlook
What is Web3?
219
INTERNET & PROTOCOLS
Technical Foundations
Applications
- Social Media: Platforms like Mastodon and Lens Protocol give users control
over data and content.
- Finance: DeFi platforms enable lending, borrowing, and trading without
banks.
- Gaming: Blockchain games like Axie Infinity use NFTs for in-game assets.
- Content Creation: Platforms like Mirror allow creators to monetize work
via NFTs or tokens.
Challenges
220
EMERGING INTERNET TECHNOLOGIES
illegal activities.
- Security: Smart contract vulnerabilities have led to losses (e.g., $600
million Poly Network hack in 2021).
Future Outlook
Web3 aims to create a more equitable internet, but adoption hinges on user-
friendly tools, lower costs, and regulatory clarity. Projects like Polygon and
Solana address scalability, while wallets like MetaMask simplify access.
Technical Foundations
- Qubits: Unlike binary bits (0 or 1), qubits can represent multiple states
simultaneously, enabling complex computations.
- Entanglement: Linked particles share states, allowing instant data
transfer regardless of distance.
- Quantum Key Distribution (QKD): Protocols like BB84 ensure unhackable
encryption by detecting eavesdropping.
221
INTERNET & PROTOCOLS
Applications
- Secure Communication: QKD protects sensitive data, ideal for finance and
defense.
- Distributed Quantum Computing: Connects quantum computers for
enhanced processing (e.g., simulating molecules for drug discovery).
- Time Synchronization: Precise quantum clocks improve GPS and financial
trading.
Challenges
Future Outlook
Early quantum networks exist (e.g., China’s 2,000-km QKD network), but a
global quantum internet is decades away. Research at institutions like Delft
University and projects like the EU’s Quantum Internet Alliance are advancing
the field.
222
EMERGING INTERNET TECHNOLOGIES
The internet’s global reach and open standards enable rapid adoption of these
technologies.
223
INTERNET & PROTOCOLS
9. Future Implications
- Economic Impact: 5G and Web3 could add trillions to global GDP by 2030.
- Social Change: Decentralized platforms empower users but challenge
traditional institutions.
- Security Paradigm: Quantum internet and blockchain redefine trust and
privacy.
- Innovation Ecosystem: Open, decentralized networks foster grassroots
development.
224
EMERGING INTERNET TECHNOLOGIES
python
try:
Check connection
if web3.is_connected():
# Get latest block
latest_block = web3.eth.get_block("latest")
print(f"Latest Block Number: {latest_block['number']}")
print(f"Block Hash: {latest_block['hash'].hex()}")
print(f"Timestamp: {latest_block['timestamp']}")
print(f"Transactions: {len(latest_block['transactions'])}")
else:
print("Failed to connect to Ethereum node")
except Exception as e:
print(f"Error: {e}")
Explanation
- Setup: Install ‘web3.py‘ via ‘pip install web3‘. Sign up at Infura for a free
Ethereum node URL.
- Functionality: Connects to Ethereum’s mainnet and retrieves the latest
225
INTERNET & PROTOCOLS
block’s details.
- Purpose: Demonstrates Web3 interaction, foundational for DApps.
- Error Handling: Catches connection or node issues.
Conclusion
226
28
227
INTERNET & PROTOCOLS
For networking, the CLI reveals connection details, scans ports, and analyzes
packets. In cybersecurity, it’s the gateway to penetration testing and threat
detection. For web developers, it simplifies server configuration and resource
fetching. The terminal’s power lies in its direct access to system resources,
making it a vital tool in 2025’s digital landscape.
Windows offers two primary CLIs: Command Prompt (legacy) and PowerShell
(modern, scriptable). Below are key commands:
228
BASIC TERMINAL COMMANDS AND NETWORKING TOOLS
229
INTERNET & PROTOCOLS
Linux/macOS: Bash
Linux and macOS use Bash (Bourne Again Shell) or similar shells (e.g., Zsh on
macOS). Below are key commands:
- ping:
- Purpose: Tests connectivity, similar to Windows.
- Example: ‘ping -c 4 google.com‘ sends 4 packets.
- Use Case: Check server availability.
- traceroute:
- Purpose: Traces packet routes, like ‘tracert‘.
- Example: ‘traceroute example.com‘ shows hops.
- Use Case: Diagnose routing issues.
230
BASIC TERMINAL COMMANDS AND NETWORKING TOOLS
- whoami:
- Purpose: Displays the current user’s username.
- Example: ‘whoami‘ outputs “user”.
- Use Case: Verify user context for permissions.
- top:
- Purpose: Monitors system processes in real-time.
- Example: ‘top‘ shows CPU, memory, and process details.
- Use Case: Identify resource-heavy applications.
- sudo:
- Purpose: Executes commands with superuser privileges.
- Example: ‘sudo apt update‘ updates package lists (Ubuntu).
- Use Case: Perform administrative tasks.
- chmod:
- Purpose: Changes file permissions.
- Example: ‘chmod 755 script.sh‘ makes a script executable.
- Use Case: Secure or enable files.
- curl:
- Purpose: Transfers data via HTTP, FTP, etc.
- Example: ‘curl https://api.example.com‘ fetches API data.
- Use Case: Test APIs or download resources.
- wget:
- Purpose: Downloads files from the web.
- Example: ‘wget https://example.com/file.txt‘ saves ‘file.txt‘.
- Use Case: Automate file retrieval.
- nano:
231
INTERNET & PROTOCOLS
- ssh:
- Purpose: Securely connects to remote servers.
- Example: ‘ssh [email protected]‘ logs into a remote machine.
- Use Case: Manage servers or transfer files.
- Wireshark:
- Purpose: Captures and analyzes network packets.
- Example: Filter HTTP traffic to inspect requests.
- Use Case: Debug network issues or detect malicious activity.
- Platforms: Windows, Linux, macOS (GUI with CLI options).
- Netcat (nc):
- Purpose: Reads/writes data across network connections, known as the
“Swiss Army knife” of networking.
- Example: ‘nc -l 12345‘ listens on port 12345; ‘nc 192.168.1.100 12345‘
connects.
- Use Case: Test connectivity, transfer files, or create backdoors (ethical use
232
BASIC TERMINAL COMMANDS AND NETWORKING TOOLS
only).
- Platforms: Linux, macOS (Windows via third-party ports).
- curl / wget:
- Purpose: Fetch data from URLs, as described above.
- Use Case: Test APIs, download files, or scrape web content.
- dig:
- Purpose: Queries DNS records, more powerful than ‘nslookup‘.
- Example: ‘dig example.com A‘ returns the A record (IP address).
- Use Case: Troubleshoot DNS or verify domain configurations.
- Platforms: Linux, macOS (Windows via tools like BIND).
- speedtest-cli:
- Purpose: Measures internet speed via the terminal.
- Example: ‘speedtest-cli‘ tests download/upload speeds and ping.
- Use Case: Benchmark network performance.
- Platforms: Windows, Linux, macOS (install via ‘pip install speedtest-cli‘).
- sqlmap:
- Purpose: Automates SQL injection testing for web applications.
- Example: ‘sqlmap -u “http://example.com/page?id=1” —dbs‘ enumer-
ates databases.
233
INTERNET & PROTOCOLS
- Burp Suite:
- Purpose: Web vulnerability scanner, intercepting and modifying HTTP
requests.
- Example: Use the proxy to inspect traffic between browser and server.
- Use Case: Test web apps for XSS or CSRF vulnerabilities.
- Platforms: Windows, Linux, macOS (GUI with CLI support).
- Aircrack-ng:
- Purpose: Tests Wi-Fi security by capturing packets and cracking keys.
- Example: ‘aircrack-ng -w wordlist.txt capture.cap‘ cracks WPA2 keys.
- Use Case: Assess wireless network security.
- Platforms: Linux, macOS (limited Windows support).
- Caution: Illegal without network owner’s consent.
234
BASIC TERMINAL COMMANDS AND NETWORKING TOOLS
To illustrate CLI networking, let’s create a Python script using the ‘python-
nmap‘ library to perform a basic network scan, simulating ‘nmap‘ functional-
ity.
import nmap
import sys
try:
Perform a basic scan (-sP for ping scan)
print(f"Scanning {target} for active hosts...")
nm.scan(hosts=target, arguments="-sP")
# Display results
for host in nm.all_hosts():
if nm[host].state() == "up":
print(f"Host: {host} is up")
Optional: Scan for open ports
nm.scan(host, arguments="-sT -p 80,443")
for proto in nm[host].all_protocols():
ports = nm[host][proto].keys()
for port in ports:
state = nm[host][proto][port]["state"]
print(f"Port: {port} ({proto}) is {state}")
except Exception as e:
print(f"Error: {e}")
sys.exit(1)
235
INTERNET & PROTOCOLS
Explanation
This script bridges CLI tools with scripting, showcasing automation potential.
- Checking Connectivity:
- Use ‘ping‘ or ‘curl‘ to verify if a server is online.
- Example: ‘ping -c 4 google.com‘ confirms internet access.
236
BASIC TERMINAL COMMANDS AND NETWORKING TOOLS
237
INTERNET & PROTOCOLS
- Kali Linux: Linux distribution preloaded with security tools like ‘nmap‘,
‘Metasploit‘, and ‘sqlmap‘.
- Use Case: All-in-one penetration testing platform.
- Recon-ng: Web reconnaissance for gathering OSINT data.
- Example: Use modules to enumerate subdomains or emails.
- Use Case: Pre-attack intelligence gathering.
- Platforms: Linux, macOS.
8. Safety Tips
- Commands like ‘sudo‘, ‘rm -rf‘, or ‘shutdown‘ can cause irreversible damage.
Double-check before executing.
- Example: ‘rm -rf /‘ deletes all files (avoid at all costs).
238
BASIC TERMINAL COMMANDS AND NETWORKING TOOLS
- Permissions:
- Only scan or test systems you own or have explicit permission for. Unautho-
rized use violates laws like the Computer Fraud and Abuse Act (CFAA).
- Backup Data:
- Rate Limiting:
- Avoid overwhelming networks with tools like ‘nmap‘ or ‘sqlmap‘, which can
trigger security alerts.
- Automation and AI: AI-driven tools will enhance ‘nmap‘ and ‘Metasploit‘,
predicting vulnerabilities faster.
- Cloud Integration: CLI tools like ‘aws‘ CLI and ‘kubectl‘ dominate cloud
and Kubernetes management.
- Zero-Trust Security: Tools will align with zero-trust models, requiring
continuous verification.
239
INTERNET & PROTOCOLS
- Network Monitor: Script ‘ping‘ to track server uptime and log results.
- Port Scanner: Extend the ‘nmap‘ script to check additional ports or
services.
- Packet Sniffer: Use ‘tshark‘ (Wireshark’s CLI) to capture and filter HTTP
traffic.
- SQL Injection Test: Run ‘sqlmap‘ on a local test server (e.g., DVWA) to
learn vulnerability detection.
- Metasploit Lab: Set up a VM to practice ethical hacking with Metasploit.
python
import speedtest
import sys
try:
# Initialize speedtest
st = speedtest.Speedtest()
240
BASIC TERMINAL COMMANDS AND NETWORKING TOOLS
st.get_best_server()
# Test ping
ping = st.results.ping
# Display results
print(f"Download: {download:.2f} Mbps")
print(f"Upload: {upload:.2f} Mbps")
print(f"Ping: {ping:.2f} ms")
except Exception as e:
print(f"Error: {e}")
sys.exit(1)
Explanation
Conclusion
The terminal remains a powerful tool for web, networking, and cybersecurity
tasks, offering precision and flexibility unmatched by GUIs. Commands
like ‘ping‘, ‘netstat‘, and ‘curl‘, alongside tools like ‘nmap‘, ‘Wireshark‘,
241
INTERNET & PROTOCOLS
242
29
243
INTERNET & PROTOCOLS
- How It Works: We delved into the architecture of the internet, from TCP/IP
protocols to DNS resolution, understanding how data packets traverse global
networks to deliver web pages, emails, and videos. We learned about client-
server models, HTTP/HTTPS, and the role of ISPs in connecting us to this
digital highway.
- Web Technologies: Chapters on HTML, CSS, JavaScript, and frameworks
like React showed how developers craft interactive, user-friendly websites.
We explored APIs and web services, the glue connecting apps like Google Maps
to ride-sharing platforms.
- Networking and Security: We mastered terminal commands (‘ping‘,
‘nmap‘, ‘curl‘) and tools like Wireshark and Metasploit, learning to diagnose
networks, secure systems, and ethically test vulnerabilities.
- Biotechnology and AI: We examined how the internet accelerates fields
like genetic engineering (e.g., CRISPR via genomic databases) and powers
AI through cloud computing and massive datasets, with Python examples
illustrating machine learning.
- Social Media and Governance: We analyzed social media’s societal impact,
from connectivity to misinformation, and explored internet governance
through organizations like ICANN and laws like GDPR.
- Emerging Technologies: We ventured into the future with 5G’s ultra-low
latency, blockchain’s decentralized ledgers, Web3’s user-centric vision, and
the quantum internet’s promise of unhackable communication.
Each chapter built on the last, revealing the internet as a layered ecosystem
where technical, social, and ethical dimensions intertwine.
244
WRAPPING IT ALL UP – THE INTERNET, YOU, AND THE FUTURE
Yet, this connectivity comes with trade-offs: privacy concerns, mental health
impacts, and the digital divide (37% of the world remains offline in 2025).
The internet is a double-edged sword, amplifying both opportunity and
responsibility.
245
INTERNET & PROTOCOLS
The internet evolves rapidly, with new protocols, frameworks, and threats
emerging daily. Staying informed requires proactive engagement with trusted
sources and communities.
- Mozilla:
- Why: Advocates for an open internet via Firefox and MDN Web Docs.
- How: Read MDN (developer.mozilla.org) for tutorials and subscribe to
Mozilla’s blog.
- Example: Mozilla’s WebXR initiatives drive AR/VR on the web.
- GitHub Trends:
- Why: Tracks open-source projects and emerging tech.
- How: Explore github.com/trending or star repositories in AI, blockchain,
or Web3.
- Example: Repositories like ‘langchain‘ showcase AI advancements.
- Dev.to:
- Why: A developer community sharing tutorials and insights.
- How: Browse dev.to for articles on APIs, DevOps, and more. Join
discussions.
246
WRAPPING IT ALL UP – THE INTERNET, YOU, AND THE FUTURE
- Hacker News:
- Why: Curates tech news, startups, and research.
- How: Visit news.ycombinator.com daily for curated links and comments.
- Example: Discussions on quantum computing breakthroughs spark
curiosity.
Join Communities
- Stack Overflow:
- Why: Solves coding queries and shares expertise.
- How: Ask/answer questions on stackoverflow.com or browse tags like
‘python‘ or ‘networking‘.
- Example: Find solutions for debugging API errors.
- Reddit:
- Why: Hosts tech subreddits like r/programming, r/netsec, and r/webdev.
- How: Participate in discussions or read AMAs with industry leaders.
- Example: r/cybersecurity debates new vulnerabilities.
247
INTERNET & PROTOCOLS
Practical Tools
- RSS Feeds: Use Feedly to aggregate blogs from TechCrunch, Ars Technica, or
IEEE Spectrum.
- Newsletters: Subscribe to “The Morning Brew” or “Bytes” for daily tech
digests.
- Podcasts: Listen to “Syntax” (web dev) or “Darknet Diaries” (cybersecu-
rity) for insights.
- Conferences: Attend virtual events like WWDC, DEF CON, or Web Summit
via livestreams.
To automate staying updated, let’s create a Python script using ‘requests‘ and
‘BeautifulSoup‘ to scrape tech news headlines from Hacker News.
import requests
from bs4 import BeautifulSoup
import sys
# URL to scrape
url = "https://news.ycombinator.com/"
try:
Send GET request
response = requests.get(url, timeout=10)
response.raise_for_status()
# Parse HTML
soup = BeautifulSoup(response.text, "html.parser")
248
WRAPPING IT ALL UP – THE INTERNET, YOU, AND THE FUTURE
Example output:
Explanation
249
INTERNET & PROTOCOLS
4. Encouragement to Explore
- Create Websites:
- Use HTML, CSS, and JavaScript to build a portfolio or blog. Deploy it on
GitHub Pages or Netlify.
- Example: A personal site showcasing your projects, styled with Tailwind
CSS.
- Master the Terminal:
- Practice commands like ‘curl‘, ‘ssh‘, or ‘nmap‘ in a virtual machine (e.g.,
Ubuntu on VirtualBox).
- Example: Set up a local server with ‘python -m http.server‘ and access it
via ‘curl‘.
- Explore APIs:
- Integrate APIs like OpenWeatherMap or X into Python scripts to fetch data
or automate tasks.
- Example: Build a Twitter bot that posts daily tech tips using ‘xai‘
- Example: Due to character limits, I’ll assume you meant “explore APIs”
as a typo for enthusiasm or emphasis. If you meant something specific like an
xAI API, let me know, but here we continue with general API usage.
- Set Up a Server:
- Use AWS EC2 or a Raspberry Pi to host a web server with Nginx or Flask.
250
WRAPPING IT ALL UP – THE INTERNET, YOU, AND THE FUTURE
- Example: Host a Node.js app serving a to-do list API, accessible via your
server.
Get Involved
- Open-Source Projects:
- Contribute to repositories on GitHub, from fixing typos to adding features.
- Example: Enhance a tool like ‘speedtest-cli‘ by improving its output
format.
- Steps: Fork a repo, clone it (‘git clone ‘), make changes, and submit a pull
request.
- Ethical Hacking:
- With explicit permission, use tools like ‘Metasploit‘ or ‘sqlmap‘ to test
system security.
- Example: Join a CTF (Capture The Flag) event on Hack The Box to practice
hacking legally.
- Caution: Unauthorized hacking violates laws like CFAA; always obtain
consent.
- Learning Platforms:
- TryHackMe and OverTheWire offer guided labs for networking and
security.
- Example: Complete TryHackMe’s “Basic Networking” room to master
‘nmap‘.
Why Explore?
Hands-on projects build skills, boost confidence, and open career paths in
development, DevOps, or cybersecurity. They also foster curiosity, letting
you uncover the internet’s layers— internet—from protocols to APIs to
251
INTERNET & PROTOCOLS
decentralized systems.
- Technological Horizons:
- 5G and Edge Computing will power smart cities and IoT, connecting 50
billion devices by 2030.
- Web3 and Blockchain will shift control to users, with DApps redefining
social media and finance.
- Quantum Internet promises secure, instant communication, revolutioniz-
ing cryptography.
- AI Integration will personalize experiences but raise ethical questions
about bias and autonomy.
- Societal Implications:
- Empowerment: Decentralized platforms and open-source tools democra-
tize innovation.
- Challenges: Misinformation, privacy erosion, and the digital divide
demand vigilance.
- Governance: Laws like GDPR’s and emerging AI regulations will shape
responsible use, but global harmony is needed.
As a user, you’re not passive—you shape this future through your actions,
from coding to advocating for ethical policies.
252
WRAPPING IT ALL UP – THE INTERNET, YOU, AND THE FUTURE
- Learn: Dive into its mechanics, from DNS to blockchain, to master its
potential. Never stop asking “how” and “why”.”
- Build: Create websites, apps, or scripts that solve problems, from simple
scrapers to Web3 DApps.
- Protect: Safeguard your digital presence with strong passwords, 2FA, and
ethical security practices. Advocate for user privacy and data rights.
- Question: Challenge monopolies, misinformation, and unethical practices.
Use critical thinking to navigate echo chambers and biases.
Cap your journey with these hands-on activities to apply your knowledge:
253
INTERNET & PROTOCOLS
on Heroku.
Example: An API returning your GitHub repo stats.
- Home Server Lab:
- Set up a Raspberry Pi as a media server or VPN, using ‘ssh‘ and ‘nginx‘.
Example: Host a private cloud with Nextcloud.
- Open-Source Contribution:
- Fix a bug in a small GitHub project or document a tool like ‘ipfs‘.
Example: Improve a Python library’s README.
- Ethical Hacking Challenge:
- Join TryHackMe’s “Intro to Offensive Security” room to practice ‘nmap‘
and ‘sqlmap‘.
Example: Scan a test VM for vulnerabilities legally.
Conclusion
This book has guided you through the internet’s past, present, and future, from
its protocols and web technologies to its social, ethical, and emerging frontiers.
You’ve learned how it powers our world— from APIs, connecting apps to AI,
transforming industries, to blockchain, redefining trust. The internet is a
reflection of humanity, its ingenuity, and its flaws, and As you move forward,
you hold the tools to shape it. Stay curious, through communities, like Stack
Overflow, and resources like W3C. Build boldly, with websites, APIs, or servers.
Protect vigilantly, with security tools like ‘nmap‘. And question relentlessly,
advocating for an open, equitable internet. The future is in your hands—make
it a digital world worth celebrating.
254
30
References
255
INTERNET & PROTOCOLS
• MDN: HTTP
• MDN: FTP & DNS Basics
256
REFERENCES
• MongoDB University
• W3Schools: JavaScript
• PostgreSQL Docs
• WordPress.org
• “Static vs Dynamic Sites” – Netlify Docs
• Vercel, Hugo, Jekyll docs
• Let’s Encrypt
• TLS Explained – Cloudflare
257
INTERNET & PROTOCOLS
• ICANN
• Namecheap Blog: How Domains Work
• Apache, Nginx Docs
• IEEE Spectrum
• NASA Deep Space Network
• TechTarget: Wi-Fi Standards Explained
258
REFERENCES
• NCBI
• ResearchGate
• IEEE on Biometrics
• Ahrefs Blog on DOI and Research Impact
• Web3 Foundation
• Quantum Internet Alliance
• The Verge & Wired for Tech Trends
259
About the Author
260
3ZERO Club.
261