What is the difference between the local IP address and the internet IP address when setting up a server on a local PC?

When setting up a server on a local PC, the local IP address is used to access the server within the local network, while the internet IP address is used to access the server from outside the local network. To make the server accessible both locally and over the internet, you can set up port forwarding on your router to forward incoming traffic on a specific port to the local IP address of the server.

// Example of setting up port forwarding for a server running on port 80
$localIP = '192.168.1.100'; // Local IP address of the server
$port = 80; // Port number of the server

// Configure port forwarding on the router to forward incoming traffic on port 80 to the local IP address
// This process may vary depending on the router model and firmware