Download the PHP package badraxas/adstxt without Composer
On this page you can find all versions of the php package badraxas/adstxt. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download badraxas/adstxt
More information about badraxas/adstxt
Files in badraxas/adstxt
Package adstxt
Short Description 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.
License proprietary
Informations about the package adstxt
AdsTxt PHP Parser
Table of Contents
- Introduction
- Installation
- Usage
- Parsing AdsTxt from File
- Parsing AdsTxt from String
- Parsing AdsTxt from URL
- Working with AdsTxt Instance
- Available Line Types
- Vendor Line
- Variable Line
- Comment Line
- Invalid Line
- Blank Line
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
You can install the library via Composer. Run the following command in your project directory:
Usage
Parsing AdsTxt from File
Parsing AdsTxt from String
Parsing AdsTxt from URL
PSR-18 and PSR-17 Compliance
To ensure interoperability and standard-compliant HTTP messaging, the AdsTxtFetcher class requires a PSR-18 compliant HTTP client (ClientInterface) and a PSR-17 compliant HTTP request factory (RequestFactoryInterface).
This design choice allows for flexibility in integrating the AdsTxtFetcher with various HTTP client implementations that conform to these PSR standards, ensuring a broad compatibility and the ability to easily swap different client implementations as needed.
Working with AdsTxt Instance
Available Line Types
Vendor Line
The Vendor line represents a line in the ads.txt file containing vendor information.
Variable Line
The Variable line represents a line in the ads.txt file containing a variable with its name and value.
Comment Line
The Comment line represents a comment line in the ads.txt file.
Note : you can associate a Comment instance to any instance of Vendor, Variable or Invalid.
Invalid Line
The Invalid line represents an invalid line in the ads.txt file.
Blank Line
The Blank line represent a blank line in the ads.txt.
All versions of adstxt with dependencies
ext-mbstring Version *
psr/http-client Version ^1.0
psr/http-factory Version ^1.0