PHPackages                             zupolgec/gdown-php - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. zupolgec/gdown-php

ActiveLibrary[HTTP &amp; Networking](/categories/http)

zupolgec/gdown-php
==================

Google Drive Public File Downloader when Curl/Wget Fails - PHP implementation

v0.5.0(5mo ago)214MITPHPPHP ^8.3

Since Nov 21Pushed 5mo agoCompare

[ Source](https://github.com/zupolgec/gdown-php)[ Packagist](https://packagist.org/packages/zupolgec/gdown-php)[ RSS](/packages/zupolgec-gdown-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (6)Versions (14)Used By (0)

GDown PHP
=========

[](#gdown-php)

> ⚠️ **VIBE-CODED**: This entire package was coded in a single AI-powered session. Proceed with confidence! 🎵

[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](https://opensource.org/licenses/MIT)[![PHP Version](https://camo.githubusercontent.com/f9a61eee600abfa4c06628ff826dc6a7dfffc0cceca828fd79751b43e44f451f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253345253344382e302d626c75652e737667)](https://www.php.net/)

**Google Drive Public File Downloader when Curl/Wget Fails - PHP Implementation**

GDown PHP is a PHP port of the popular Python [gdown](https://github.com/wkentaro/gdown) library, providing robust downloading of public files from Google Drive.

Features
--------

[](#features)

- ✅ **Folder downloads** - Download entire Google Drive folders (up to 50 files)
- ✅ **Skip security notices** - Download large files that curl/wget can't handle
- ✅ **File info preview** - Check file name and size BEFORE downloading (unique to PHP version!)
- ✅ **Fuzzy URL parsing** - Extract file IDs from any Google Drive URL format
- ✅ **Resume support** - Continue interrupted downloads
- ✅ **Google Docs/Sheets/Slides** - Download with format conversion (PDF, DOCX, XLSX, PPTX, etc.)
- ✅ **Speed limiting** - Control download bandwidth
- ✅ **Proxy support** - Download through HTTP/HTTPS proxies
- ✅ **Cookie support** - Use browser cookies for authenticated access
- ✅ **Progress display** - Real-time download progress
- ✅ **CLI and Library** - Use as command-line tool or integrate into your application

Installation
------------

[](#installation)

### Via Composer

[](#via-composer)

```
composer require zupolgec/gdown-php
```

### Global Installation (for CLI usage)

[](#global-installation-for-cli-usage)

```
composer global require gdown/gdown-php
```

Usage
-----

[](#usage)

### Command Line Interface

[](#command-line-interface)

#### Basic Download

[](#basic-download)

```
# Download by URL
gdown https://drive.google.com/uc?id=1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ

# Download by file ID
gdown 1l_5RK28JRL19wpT22B-DY9We3TVXnnQQ

# Specify output filename
gdown https://drive.google.com/uc?id=FILE_ID -O output.zip
```

#### Fuzzy URL Extraction

[](#fuzzy-url-extraction)

```
# Extract file ID from any Drive URL format
gdown --fuzzy 'https://drive.google.com/file/d/10DXTyitz_PnjGP9u7vDzp916iRshE43K/view?usp=drive_link'
```

#### Download Folders

[](#download-folders)

```
# Download entire folder (up to 50 files)
gdown --folder https://drive.google.com/drive/folders/FOLDER_ID

# Download folder to specific directory
gdown --folder https://drive.google.com/drive/folders/FOLDER_ID --output my_folder
```

#### Get File Info (Without Downloading)

[](#get-file-info-without-downloading)

```
# Check file name and size before downloading
gdown --info https://drive.google.com/uc?id=FILE_ID
```

Output:

```
File Name: my-large-file.zip
File Size: 1.25 GB
MIME Type: application/zip
Last Modified: 2024-01-15 10:30:00

```

#### Download Google Docs/Sheets/Slides

[](#download-google-docssheetsslides)

```
# Download Google Doc as DOCX (default)
gdown https://docs.google.com/document/d/DOC_ID/edit

# Download as PDF
gdown https://docs.google.com/document/d/DOC_ID/edit --format pdf

# Download Google Sheet as XLSX
gdown https://docs.google.com/spreadsheets/d/SHEET_ID/edit

# Download Google Slides as PPTX
gdown https://docs.google.com/presentation/d/SLIDE_ID/edit
```

#### Resume Downloads

[](#resume-downloads)

```
# Resume interrupted download
gdown https://drive.google.com/uc?id=FILE_ID --continue
```

#### Speed Limiting

[](#speed-limiting)

```
# Limit download speed to 1MB/s
gdown https://drive.google.com/uc?id=FILE_ID --speed 1MB
```

#### Proxy Support

[](#proxy-support)

```
# Download through proxy
gdown https://drive.google.com/uc?id=FILE_ID --proxy http://proxy.example.com:8080
```

#### All Options

[](#all-options)

```
gdown --help
```

### PHP Library Usage

[](#php-library-usage)

#### Basic Download

[](#basic-download-1)

```
