Rilato Affiliate Manager
$77.00 Version 1 · PHP + MariaDB · one file
Other people sell your product, and you pay them only when they deliver. That is the whole idea of an affiliate program. This runs one on your own server: signups, tracking links, commissions, refund claw-backs and payouts, out of a single PHP file that builds its own database on first run.
You cannot pay people fairly with numbers you do not have
An affiliate program is a promise: send me a buyer and I will pay you a share. Keeping that promise means knowing, months later and to the cent, which click turned into which order — and being able to show your affiliate the same numbers you are looking at.
Homemade tracking falls apart at exactly the points that cost money. The cookie expires before the buyer comes back, so a real sale is credited to nobody. Somebody edits the cookie and credits themselves. An order is refunded next week and the commission has already gone out. Two affiliates both claim the same buyer and you have no record to settle it with. Meanwhile the hosted platforms want a monthly fee plus a slice of every sale, and they keep the data — the day you leave, your affiliates' history stays with them.
An affiliate who is not sure you are counting honestly
promotes somebody else.
What it does
It gives an affiliate a link and gives you the ledger behind it. Five addresses are the whole system:
- Admin — setup, affiliates, campaigns, creatives, sales, payouts, reports, e-mail templates, blocklist, tools. Behind a key of your choosing in the URL.
- Affiliate portal — a public application form, a login, and a dashboard where each partner sees their own stats, builds links, copies creative code and reads their payment history.
- Tracking link —
?i=CODE, plus optional campaign, creative, deep-link override and three sub-ID values of your own that come back to you on the report. - Banner —
?b=IDserves the image and counts the impression. The portal writes that code for the affiliate. - Conversion — your shop tells it a sale happened.
That last one has three forms, because shops differ. A server-to-server postback is the reliable one, signed so nobody can invent sales:
If you cannot run code on the thank-you page, a one-pixel image does the same
job without the signature. And phone orders, POS sales and anything else that never
touches a browser go in by hand in the admin, or get attributed automatically by
coupon code — the affiliate gives out VERANO10,
the order carries it, the commission lands in the right account.
The parts that keep it honest
- The cookie is signed. It carries an HMAC, so an affiliate cannot hand-edit it to move someone else's conversions into their own account.
- Refunds claw the money back. Send the same order again as a void, or press Reverse in the admin, and the commission is reversed through the ledger — including the tier commissions already credited to the parents above that affiliate.
- Orders are de-duplicated. Attribution is keyed on your order id, so a reloaded thank-you page does not pay twice.
- Fraud controls that name the specific tricks: self-referral blocking, duplicate-IP conversions, a click-flooding throttle, an IP and e-mail blocklist, and a minimum time between click and conversion.
- Postbacks without a valid signature are rejected. You can switch that off in Setup. Do not.
Commissions that match how you actually pay
Four models — percent of sale, flat fee per sale, pay per click, pay per lead — each settable globally, per campaign, per performance level, or on one individual affiliate, where the override wins.
Performance levels promote an affiliate to a better rate as their approved volume grows, without you remembering to do it. Unlimited referral tiers pay the affiliate who recruited the affiliate, up to whatever depth you set. Recurring commissions handle subscriptions: post each rebill against the same order and every one becomes its own commission row at the campaign's recurring rate.
Getting them paid
The payout engine works to a threshold: earnings sit in the ledger until an affiliate is worth paying, then a batch is generated and exported as CSV for PayPal Mass Pay or a bank upload. Every payment stays in the history, on your side and on theirs, so the question "when was I last paid, and for what" answers itself without an e-mail to you.
Reports cover dashboard KPIs, daily traffic, EPC, conversion rate, top affiliates, top creatives, the sub-ID breakdown and the raw click and sale logs — so when an affiliate asks why their number looks low, you can both look at the same row.
Everything in the box
- Affiliate signup, approval queue, login, profile and password reset.
- Campaigns: each offer with its own destination URL, commission rules and cookie window.
- Creatives: banners, text links, text ads and HTML or e-mail snippets, each counting its own impressions, clicks and conversions.
- Click tracking with unique-click detection, referrer capture, deep linking and sub-ID passthrough.
- E-mail notification templates with merge tokens.
- A read-only JSON API, one key per affiliate, so a partner can pull their own stats into their own dashboard.
- Nightly cron housekeeping: prunes old click rows, applies earned promotions and marks the payout period. By CLI or by URL.
- Ships with Affiliate Manager Diagnostics, a separate
single-file tool that reports exactly why the script will not start on a
given server — PHP build, extensions,
disable_functions, file encoding, a real syntax check, database grants, folder permissions and the error log — instead of leaving you with a blank 500 page.
Security
- Every database call is a prepared statement with bound parameters.
- Passwords stored with
password_hash()(bcrypt), verified withpassword_verify(), rehashed automatically on login. - The admin gate compares with
hash_equals(), so the key cannot be guessed by timing it. - A per-session CSRF token on every form that changes anything.
- Login attempts throttled per IP.
- Database errors go to the server log; the visitor sees a neutral reference code and nothing about your schema.
System requirements
- PHP 8.4, with PDO and
pdo_mysql. - MariaDB 11.x or MySQL. Tables are created on the first hit and migrate themselves on later versions — the database user needs CREATE on its own schema.
- Apache 2.4. No
mod_rewriteneeded. - Cron, or any scheduler that can fetch a URL once a night.
- A mailbox to send notifications from.
$77.00
One payment. You own this version and every update to it, on as many of your own servers as you like.
Order this scriptThis one is still being listed in our shop, so for the moment the order goes through the contact page. Write and you get payment instructions and the download the same day.
Version 1 · PHP + MariaDB · Licence and refunds