PHPackages                             badraxas/adstxt - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. badraxas/adstxt

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

badraxas/adstxt
===============

The AdsTxt Generator for PHP is a simple and easy-to-use library that allows you to work with the Authorized Digital Sellers (ads.txt) file format in your PHP applications.

v3.0.4(2y ago)021proprietaryPHPPHP &gt;=8.1

Since Jul 29Pushed 2y ago1 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (16)Used By (0)

AdsTxt PHP Parser
=================

[](#adstxt-php-parser)

Table of Contents
-----------------

[](#table-of-contents)

- [Introduction](#introduction)
- [Installation](#installation)
- [Usage](#usage)
    - [Parsing AdsTxt from File](#parsing-adstxt-from-file)
    - [Parsing AdsTxt from String](#parsing-adstxt-from-string)
    - [Parsing AdsTxt from URL](#parsing-adstxt-from-url)
    - [Working with AdsTxt Instance](#working-with-adstxt-instance)
- [Available Line Types](#available-line-types)
    - [Vendor Line](#vendor-line)
    - [Variable Line](#variable-line)
    - [Comment Line](#comment-line)
    - [Invalid Line](#invalid-line)
    - [Blank Line](#blank-line)

Introduction
------------

[](#introduction)

The AdsTxt Parser for PHP is a simple and easy-to-use library that allows you to work with the Authorized Digital Sellers (ads.txt) file format in your PHP applications.

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

[](#installation)

You can install the library via Composer. Run the following command in your project directory:

```
composer require badraxas/adstxt
```

Usage
-----

[](#usage)

### Parsing AdsTxt from File

[](#parsing-adstxt-from-file)

```
