![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Confirmed User
Industry Role:
Join Date: Apr 2003
Location: Florida
Posts: 649
|
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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 | |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,055
|
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. .
__________________
All cookies cleared! |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
Quote:
I would start it as one table and if it becomes a bottleneck look into ways of splitting it up.
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Apr 2003
Location: Florida
Posts: 649
|
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... |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
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.
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
bored
Industry Role:
Join Date: Aug 2003
Location: Metaverse
Posts: 4,675
|
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
#
__________________
# ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Pay It Forward
Industry Role:
Join Date: Sep 2005
Location: Yo Mama House
Posts: 76,916
|
i would like to see a link trade script. do you do custom work? pm me if you do. also you have my email
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Industry Role:
Join Date: Jan 2009
Posts: 452
|
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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
|
Quote:
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 | |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
Quote:
- Constant IO Writes - Write-locks on the log, since only 1 process can write to it at once.
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
|
Yep, i used similar approach with other type of script, till i switched to memcache which is far smoother method to deal with it.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#12 | |
Confirmed User
Industry Role:
Join Date: Aug 2006
Location: Poland
Posts: 9,228
|
Quote:
INSERT INTO `table` SELECT * FROM `buffer_table`; TRUNCATE `buffer_table`; Making it very easy to migrate the data
__________________
Mechanical Bunny Media Mechbunny Tube Script | Mechbunny Webcam Aggregator Script | Custom Web Development |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Registered User
Join Date: Mar 2007
Posts: 1,745
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 | |
bored
Industry Role:
Join Date: Aug 2003
Location: Metaverse
Posts: 4,675
|
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 #
__________________
# ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Industry Role:
Join Date: Aug 2006
Location: Little Vienna
Posts: 32,235
|
Yep, that is correct too - most of trade scripts were based on file storage, only EPT and FTT2 was based on mysql.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Confirmed User
Join Date: Jan 2009
Posts: 338
|
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 ![]() ![]() 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 |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Icq: 14420613
Industry Role:
Join Date: Mar 2001
Location: chicago
Posts: 15,432
|
Tgp Software.com - Professional Traffic Managment Solutions wonder if they still sell the script
__________________
Need WebHosting ? Email me for some great deals [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
So Fucking Banned
Industry Role:
Join Date: Jun 2004
Location: America
Posts: 109
|
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! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Icq: 14420613
Industry Role:
Join Date: Mar 2001
Location: chicago
Posts: 15,432
|
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
__________________
Need WebHosting ? Email me for some great deals [email protected] |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#20 | |
Too lazy to set a custom title
Join Date: Jan 2003
Location: Los Angeles
Posts: 10,524
|
Quote:
YouTube Premium is the only streaming service I always have. I loooooove educational YouTube. |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#21 | |
bored
Industry Role:
Join Date: Aug 2003
Location: Metaverse
Posts: 4,675
|
Quote:
ps i pay for YT Premium too. the whole family uses it all day all night. #
__________________
# ![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |