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 1mo ago

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 37% 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

3581d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4222085?v=4)[Viktor](/maintainers/vleukhin)[@vleukhin](https://github.com/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

4093.0M16](/packages/edamov-pushok)[pagseguro/pagseguro-php-sdk

Biblioteca de integração com o PagSeguro

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

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

357149.3k1](/packages/michael-laravelpagseguro)[corsinvest/cv4pve-api-php

Corsinvest Proxmox VE Client API PHP

801.4M](/packages/corsinvest-cv4pve-api-php)[oxid-esales/paypal-module

This is the PayPal module for the OXID eShop.

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

This is the Amazon Pay module for the OXID eShop.

11276.2k1](/packages/bestit-amazonpay4oxid)

PHPackages © 2026

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