PHPackages                             vleukhin/adfox - 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. vleukhin/adfox

ActiveLibrary

vleukhin/adfox
==============

AdFox API Lib

v0.5.2(9y ago)2171proprietaryPHPPHP &gt;=5.4

Since Jul 4Pushed 9y ago1 watchersCompare

[ Source](https://github.com/vleukhin/adfox)[ Packagist](https://packagist.org/packages/vleukhin/adfox)[ RSS](/packages/vleukhin-adfox/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (11)Used By (0)

Library to interact with AdFox advertisment system
==================================================

[](#library-to-interact-with-adfox-advertisment-system)

Supported Features
------------------

[](#supported-features)

- Create flight/campaign
- Placing flights on place or site
- Set impressions/clicks/events restrictions
- Change flight/campaign status and level
- Create/Editing banners
- Targeting (user, time, frequency)

Examples
--------

[](#examples)

#### Create and edit campaign

[](#create-and-edit-campaign)

```
$adfox = new Adfox\Adfox('login', 'pass');

$campaign = $adfox->createCampaign('Test campaign');
$campaign->setLevel(3);
$campaign->setStatus(\AdFox\AdFox::OBJECT_STATUS_PAUSED);
$campaign->setImpressionsLimits(5000, 1000, 100);
$campaign->save();

$campaign->getMaxImpressions(); // 5000
$campaign->getMaxImpressionsPerDay(); // 1000
$campaign->getMaxImpressionsPerHour(); // 100

$campaign->isActive() // false

```

#### Create and edit flight

[](#create-and-edit-flight)

```
$adfox = new Adfox\Adfox('login', 'pass');

$campaign = $adfox->createCampaign('Test campaign', 'advertiserId');
$flight = $campaign->createFilght();

$flight->isActive() // true
$flight->setStatus(\AdFox\AdFox::OBJECT_STATUS_PAUSED)->save();
$flight->isActive() // false
$flight->isPaused() // true

$flight->setClicksLimits(5000, 1000)->save();
$flight->getMaxClicksPerDay(); // 1000
$flight->getMaxClicksPerHour(); // 0, no limit

```

#### Create and edit banners

[](#create-and-edit-banners)

```
$adfox = new Adfox\Adfox('login', 'pass');

$campaign = $adfox->createCampaign('Test campaign', 'advertiserId');
$flight = $campaign->createFilght();

$template = $adfox->findBannerTypeByName('BackGround')->findTemplate('BackGround WShifter');

$banner = \AdFox\Campaigns\Banner\Banner::make($adfox, 'New brand banner!', $template, [
	'trackingURL' => '//banners.adfox.ru/transparent.gif',
	'reference' => 'http://php.net',
	'user1' => '#fff',
])->setClicksLimits(10000)->setImpressionsLimits(500000);

$banner->addToFlight($flight);
// or
$flight->addBanner($banner);

```

```
$banner = $adfox->findBanner(1724257)->setParam('user5', '55%')->save();

```

#### Placing flights on place or site

[](#placing-flights-on-place-or-site)

```
$adfox = new Adfox\Adfox('login', 'pass');

$flight = $adfox->findFlight(123);
$site = $adfox->findSiteByName('kakprosto.ru');
$place = $site->findPlaceByName('Брендирование (асинх.)');

$flight->placeOnPlace($place);
$flight->removeFromPlace($place);

$flight->placeOnSite($site);
$flight->removeFromPlace($site);

```

#### Setting targeting

[](#setting-targeting)

```
$adfox = new Adfox\Adfox('login', 'pass');

$flight = $adfox->findFlight(123);
$targeting = new \AdFox\Campaign\Targeting\TargetingTime();
// Set impressions limits to 100 on mondays
$targeting->setImpressions(100, \AdFox\Campaign\Targeting\TargetingTime::DAY_MONDAY);

$flight->applyTargeting($targeting);

$targeting = new \AdFox\Campaign\Targeting\TargetingUser($adfox, 1 /* puid1 */);
$targeting->disableAll();
$targeting->enable(3); // enable option with key=3

$flight->applyTargeting($targeting);

$targeting = new \AdFox\Campaign\Targeting\TargetingFrequency();
$targeting->setmaxUniqueImpressions(10);
$targeting->setmaxUniqueClicks(2);
$targeting->setClicksFrequency(\AdFox\Campaign\Targeting\TargetingFrequency::FREQUENCY_DAY, 3);

$flight->applyTargeting($targeting);

```

###  Health Score

25

—

LowBetter than 40% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~1 days

Total

9

Last Release

3533d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/faeb55203e74bf85ccafe7a850444f3beda8c87dd5f560a3dc9631385bb09b03?d=identicon)[vleukhin](/maintainers/vleukhin)

---

Tags

adfoxadvertisment

### Embed Badge

![Health badge](/badges/vleukhin-adfox/health.svg)

```
[![Health](https://phpackages.com/badges/vleukhin-adfox/health.svg)](https://phpackages.com/packages/vleukhin-adfox)
```

###  Alternatives

[edamov/pushok

PHP client for Apple Push Notification Service (APNs) - Send push notifications to iOS using the new APNs HTTP/2 protocol with token-based (JWT with p8 private key) or certificate-based authentication

4072.9M14](/packages/edamov-pushok)[pagseguro/pagseguro-php-sdk

Biblioteca de integração com o PagSeguro

299452.8k14](/packages/pagseguro-pagseguro-php-sdk)[michael/laravelpagseguro

Biblioteca de integração com o gateway de pagamento PagSeguro.

357140.9k1](/packages/michael-laravelpagseguro)[oxid-esales/paypal-module

This is the PayPal module for the OXID eShop.

36510.9k2](/packages/oxid-esales-paypal-module)[bestit/amazonpay4oxid

This is the Amazon Pay module for the OXID eShop.

11275.6k1](/packages/bestit-amazonpay4oxid)[m2mobi/apns-php

Apple Push Notification &amp; Feedback Provider

1117.9k1](/packages/m2mobi-apns-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
