PHPackages                             gaojie1592/download\_network\_data\_to\_local - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [File &amp; Storage](/categories/file-storage)
4. /
5. gaojie1592/download\_network\_data\_to\_local

ActiveProject[File &amp; Storage](/categories/file-storage)

gaojie1592/download\_network\_data\_to\_local
=============================================

下载网络数据识别文件后缀后保存到本地并返回本地地址.Download the network data identification file suffix, save it to the local and return to the local address.

v1.0.2(5y ago)129MITPHPPHP &gt;=5.4

Since Mar 3Pushed 5y ago1 watchersCompare

[ Source](https://github.com/gaojie1592/Download_Network_Data_To_Local)[ Packagist](https://packagist.org/packages/gaojie1592/download_network_data_to_local)[ RSS](/packages/gaojie1592-download-network-data-to-local/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)DependenciesVersions (3)Used By (0)

Download Network Data To Local
==============================

[](#download-network-data-to-local)

[![Latest Stable Version](https://camo.githubusercontent.com/08a5f204e6ad94bdf0771648751c26d68fdf65497643145c011c6cf0ae8cdba7/68747470733a2f2f706f7365722e707567782e6f72672f67616f6a6965313539322f646f776e6c6f61645f6e6574776f726b5f646174615f746f5f6c6f63616c2f76)](//packagist.org/packages/gaojie1592/download_network_data_to_local) [![Total Downloads](https://camo.githubusercontent.com/298ac69a03de3a497e115edad4443dabe1685ebe5e31582ea3378031acf94d58/68747470733a2f2f706f7365722e707567782e6f72672f67616f6a6965313539322f646f776e6c6f61645f6e6574776f726b5f646174615f746f5f6c6f63616c2f646f776e6c6f616473)](//packagist.org/packages/gaojie1592/download_network_data_to_local) [![Coverage Status](https://camo.githubusercontent.com/c4fa258b042adc327d26d83673b057ce4c61408f8a657ca6576e56b34dd298cb/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f67616f6a6965313539322f446f776e6c6f61645f4e6574776f726b5f446174615f546f5f4c6f63616c2f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/gaojie1592/Download_Network_Data_To_Local?branch=main) [![Latest Unstable Version](https://camo.githubusercontent.com/a39bd9e6a7d379a531c678296913cd46e78837a553bb2dfbbe953fc68c079ada/68747470733a2f2f706f7365722e707567782e6f72672f67616f6a6965313539322f646f776e6c6f61645f6e6574776f726b5f646174615f746f5f6c6f63616c2f762f756e737461626c65)](//packagist.org/packages/gaojie1592/download_network_data_to_local) [![License](https://camo.githubusercontent.com/e46e0793f94c56eec345fd8c96822e7a2d48abc6a1fac8eefe17c09f919a06df/68747470733a2f2f706f7365722e707567782e6f72672f67616f6a6965313539322f646f776e6c6f61645f6e6574776f726b5f646174615f746f5f6c6f63616c2f6c6963656e7365)](//packagist.org/packages/gaojie1592/download_network_data_to_local)

功能说明:
=====

[](#功能说明)

将网络数据下载并自动识别文件后缀,保存到本地并返回本地地址.

Download network data and automatically recognize the file suffix, save it locally and return to the local address.

安装方法:
=====

[](#安装方法)

```
composer require gaojie1592/download_network_data_to_local

```

使用方法:
=====

[](#使用方法)

- 例子一:

```
require_once __DIR__ . '/vendor/autoload.php';

use gaojie1592\Download_Network_Data_To_Local;

$img = new Download_Network_Data_To_Local(
    // 必要参数:需要下载的网络地址,必须是完整的
    // Necessary parameters: the network address to be downloaded must be complete
    'http://www.github.com/gif_download',
    // 必要参数:保存到本地的地址,不包含文件名称,以'/'或'\'结尾
    // Necessary parameters: save to the local address, do not include the file name, end with'/' or'\'
    '/home/www.github.com/img/',
    // 可选参数:可以指定保存的文件名称,如果不指定则用随机字符
    // Optional parameter: you can specify the saved file name, if not specified, use random characters
    'filename'
);
$local = $img->start();

var_dump($local);

// 返回结果
string() "/home/www.github.com/img/filename.gif"
```

- 例子二:

```
require_once __DIR__ . '/vendor/autoload.php';

use gaojie1592\Download_Network_Data_To_Local;

$img = new Download_Network_Data_To_Local();

             // 必要参数:需要下载的网络地址,必须是完整的
             // Necessary parameters: the network address to be downloaded must be complete
$local = $img->set_http_url('http://www.github.com/jpg_download')
             // 必要参数:保存到本地的地址,不包含文件名称,以'/'或'\'结尾
             // Necessary parameters: save to the local address, do not include the file name, end with'/' or'\'
             ->set_local_path('/home/www.github.com/img/')
             // 可选参数:可以指定保存的文件名称,如果不指定则用随机字符
             // Optional parameter: you can specify the saved file name, if not specified, use random characters
             ->set_filename('filename')
             ->start();

var_dump($local);

// 返回结果
string() "/home/www.github.com/img/filename.jpg"
```

- 例子三:

```
require_once __DIR__ . '/vendor/autoload.php';

use gaojie1592\Download_Network_Data_To_Local;

$img = new Download_Network_Data_To_Local();

            // 必要参数:需要下载的网络地址,必须是完整的
            // Necessary parameters: the network address to be downloaded must be complete
$local = $img->set_http_url('http://www.github.com/jpg_download')
            // 必要参数:保存到本地的地址,不包含文件名称,以'/'或'\'结尾
            // Necessary parameters: save to the local address, do not include the file name, end with'/' or'\'
             ->set_local_path('/home/www.github.com/img/')
            // 可选参数:可以指定保存的文件名称,如果不指定则用随机字符
            // Optional parameter: you can specify the saved file name, if not specified, use random characters
             ->set_filename('filename')
            //  可选参数:下载持续的最大时间,需要下载的文件体积越大,则设置越大
            // Optional parameter: the maximum time for downloading, the larger the file size to be downloaded, the larger the setting
             ->set_http_timeout(50)
            //  可选参数:连接服务器的最大等待时间,如果网络不好,则设置大点
            // Optional parameter: the maximum waiting time to connect to the server, if the network is not good, set a larger one
             ->set_http_sertimeout(50)
            //  可选参数:使用代理下载
            // Optional parameter: download using proxy
             ->set_http_proxy('192.168.0.1:1080')
            //  可选参数:使用代理的账号与密码
            // Optional parameters: use proxy account and password
             ->set_http_proxyusrpwd('usrname:password')
             ->start();

var_dump($local);

// 返回结果
string() "/home/www.github.com/img/filename.jpg"
```

支持文件后缀:
=======

[](#支持文件后缀)

- js
- psd
- htm\_or\_html
- xml
- bmp
- gif
- exe
- midi
- zip
- rar
- bt
- png
- bat
- xls\_or\_doc\_or\_ppt
- txt\_or\_aspx\_or\_asp\_or\_sql
- jpg
- rdp

许可证:
====

[](#许可证)

当前软件使用的许可证是 MIT,请查看[完整的许可证](https://github.com/gaojie1592/Download_Network_Data_To_Local/blob/main/LICENSE).

This bundle is under the MIT license. See the complete [license in the bundle](https://github.com/gaojie1592/Download_Network_Data_To_Local/blob/main/LICENSE).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

1896d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4bf8ad8ba25fcf485fbf086cc37483e525d605042f825af13c2ec1b8a8c43eaa?d=identicon)[gaojie11](/maintainers/gaojie11)

---

Top Contributors

[![gaojie1592](https://avatars.githubusercontent.com/u/42528374?v=4)](https://github.com/gaojie1592 "gaojie1592 (14 commits)")

### Embed Badge

![Health badge](/badges/gaojie1592-download-network-data-to-local/health.svg)

```
[![Health](https://phpackages.com/badges/gaojie1592-download-network-data-to-local/health.svg)](https://phpackages.com/packages/gaojie1592-download-network-data-to-local)
```

###  Alternatives

[knplabs/gaufrette

PHP library that provides a filesystem abstraction layer

2.5k39.8M123](/packages/knplabs-gaufrette)[google/cloud-storage

Cloud Storage Client for PHP

34390.8M125](/packages/google-cloud-storage)[illuminate/filesystem

The Illuminate Filesystem package.

15261.6M2.6k](/packages/illuminate-filesystem)[superbalist/flysystem-google-storage

Flysystem adapter for Google Cloud Storage

26320.6M30](/packages/superbalist-flysystem-google-storage)[creocoder/yii2-flysystem

The flysystem extension for the Yii framework

2931.7M62](/packages/creocoder-yii2-flysystem)[flowjs/flow-php-server

PHP library for handling chunk uploads. Works with flow.js html5 file uploads.

2451.6M15](/packages/flowjs-flow-php-server)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
