PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Parsa Yazdani   Deb Parser   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Deb Parser
Parse Debian files to extract package information
Author: By
Last change:
Date: 12 days ago
Size: 476 bytes
 

Contents

Class file image Download

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