![]() |
PHP Traffic Trading Script - Custom Logic Needed
I am writing a traffic trading script from scratch, and after diving into this rabbit hole, realized my logic was flawed and needed to be reconsidered.
I thought I could write one big be all end all script for a network of internal free sites, but realized that tracking and querying becomes complex, or maybe even impossible. I am thinking something like this can only track one domain at a time, each free site needs it's own database and copy of the script. Is this correct? Anyone smarter than me know or have ideas? |
Quote:
If your sites are all on the same server then easy. If distributed across servers then it is more complex but can still be done. . |
Quote:
I would start it as one table and if it becomes a bottleneck look into ways of splitting it up. |
Thanks for the replies. I powered through and figured it out.
One db and three tables. IP TABLE: so I don't insert the same ip multiple times and add size to the db CLICKS TABLE: records validated trade traffic clicks on inbound. Recording the from site, to site, unique ip id to track for raw/unique, TRADES TABLE: free site trade data, I.e. domain name, url, id, and account contact info. I never built anything like this before. It's pretty intense, frustrating, yet satisfying once you break through. The queries were the biggest challenge. "Get all clicks to this domain from all trade domains, except this domain, count clicks, sort count array, create link list" It's pretty cool though, a one page wonder that I can include a top any free site on my server. It prints out a list that can later be echoed anywhere on the site. Sorry for the brag, it's 3:30 am, I am jacked on coffee, and ecstatic with php success-ism! Maybe the above logic helps someone... |
Make sure to check your queries using EXPLAIN
So l ike EXPLAIN SELECT * FROM clicks WHERE foo = 'foo' AND bar = 'bar' This will help you optimize your indexes and find bottlenecks. Avoid using "OR" in your queries as that generates a temporary table IIRC and will buttfuck you when the table gets too large. |
i watch a few of these kinds of videos each week to stay fresh and learn new tricks. one tweak can save resources and speed things up. youtube is full of tutorial videos lol
# |
i would like to see a link trade script. do you do custom work? pm me if you do. also you have my email
|
For scaleablitiy, I'd be careful about writing your data directly to your MySql tables
We had the same issue when putting together our affiliate tracking scripts. It only takes one bot to start hammering your pages and it will down your DB server We found a far better approach is to write everything to a log file first and then setup a cron script to process that log file every 15 minutes or whatever. That way you can filter out duplicates, bot scripts etc etc Hope that helps |
Quote:
|
Quote:
- Constant IO Writes - Write-locks on the log, since only 1 process can write to it at once. |
Quote:
|
Quote:
INSERT INTO `table` SELECT * FROM `buffer_table`; TRUNCATE `buffer_table`; Making it very easy to migrate the data |
Quote:
https://en.wikipedia.org/wiki/Object...tional_mapping https://en.wikipedia.org/wiki/Message_broker |
Quote:
i use flat file data for almost everything. i only use mysql if a table gets huge. traffic stats definitely don't deserve mysql lol # |
Quote:
|
traffic trading scrips
ancient forgotten technology..... you guys are funny :) mysql for traffic trading scripts :) hire archaeologists and start digging around 2000 :) then find out how huge sites manage their traffic traders on amd k6 servers :) 64mb - 512mb of memory :) https://web.archive.org/web/20010205....com/info.html blindio traffic trading script $2k for copy :) most famous ucj? https://web.archive.org/web/20000819...rinfo.com/ucj/ $1.2k |
Tgp Software.com - Professional Traffic Managment Solutions wonder if they still sell the script
|
Whatever happened to Trade Expert? Trade Expert .. seems they upgraded recently, about a year and a half ago. But its seems their stuff is broken; can't register.. Nice script when I used it before. Just was wondering.
Trade script is still needed imo, way to phil! |
I don’t think there are enough paying customers for anyone to do a trade script anymore.
There used to be a ton of options |
Quote:
YouTube Premium is the only streaming service I always have. I loooooove educational YouTube. |
Quote:
ps i pay for YT Premium too. the whole family uses it all day all night. # |
All times are GMT -7. The time now is 07:16 AM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc