If you are a web developer and know basic PHP code, you can easily make your file-sharing system from PC to mobile. You need to follow some steps and create some code.
Requirements for share video from laptop to Phone
- Make sure to install Xampp software. Click to download
- need to know the basic code of PHP
If you don’t know about PHP follow the steps and codes
*** Want to add custom code to your WordPress Website? Click Here
Steps for share video from laptop to Phone:
- Open your file manager and go to where XMPP is installed
- Open XAMPP software and run APACHE.
- Go inside the htdocs folder on XAMPP
- Inside htdocs create a folder for your system (we create ‘share files’ folder).
- In ‘share files’ folder create index.php file.
- Bring your videos or files to this folder you created ‘share files’.
- Open ‘index.php’ file on VS-Code Editor or Notepad.
<!-- index.php -->
<?php
$file_name = "your file name with extentions";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Donload file from pc</title>
</head>
<body>
<!-- Replace your files name with extensions in href="" -->
<a href="<?php echo $file_name; ?>" download> Download File </a>
</body>
</html>
- Copy This code and paste it on ‘index.php’ file.
- Make sure you change the file name that you want to download and the downloaded file must be in your create folder on htdocs in XAMPP
Now You are good to go.
To check open a browser on your PC and URL type http://localhost/your folder name
How do you download this file from mobile?
Well, For share video from laptop to Phone , you need to know how it works. Xampp creates a local server on your computer and your PC has an IP address, so we can access this Xampp server on your mobile browser too. So that we can download directly from the PC using a local server
- Open your Command Promot or CMD on PC
- Write ipconfig and hit enter.
- Here you will find IPv4 Address…… : 192.168.31.82 like this.
- copy this IPv4 address and go to your mobile browser
- In URL write 192.168.31.82/your folder name
Click download and your files will start downloading