PHP Classes

How to Use a PHP Debian Package Parser to Deb Parser: Parse Debian files to extract package information

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2024-08-11 (3 days ago) RSS 2.0 feedNot yet rated by the usersTotal: 8 This week: 8All time: 11,396 This week: 9Up
Version License PHP version Categories
deb-parser 1.0The PHP License5PHP 5, System information, Files and ..., U..., C..., P..., G...
Description 

Author

This script can parse Debian files to extract package information.

It extracts Debian Linux program package installation files into the current directory.

The script opens the package control file to parse it and extract details of the program to install like the package, name, dependencies, author, section, and version.

Picture of Parsa Yazdani
  Performance   Level  
Name: Parsa Yazdani <contact>
Classes: 3 packages by
Country: Australia Australia
Innovation award
Innovation award
Nominee: 2x

Documentation

Deb Parser

Parse deb files using php

Requirements

PHP 8

If you are on PHP 7 or lower, replace this:

if(str_starts_with($line, 'Package: '))
    $bundleid = substr($line, 9);

with this:

if(substr($line, 0, 9) === "Package: ")
    $bundleid = substr($line, 9);

How to use

  1. Put file.deb in the same directory as index.php
  2. Run index.php
  3. Done ## Variables Set - $bundleid - $packagename - $depends - $description - $author - $section - $version

  Files folder image Files (2)  
File Role Description
Accessible without login Plain text file index.php Aux. Configuration script
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:8
This week:8
All time:11,396
This week:9Up