![]() |
![]() |
![]() |
||||
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
Join Date: Nov 2001
Location: Redmond, WA
Posts: 2,727
|
Any Bored Programmers?
So I was looking around for a script kinda' like the debt clock but on a much smaller scale and after a few hours of looking finally came across a thread that got close to what I wanted.
Variables I'd like to have: Count up in cents and show that in the count Set how much (in dollars) it counts up every 24 hours (thinking around 5 or 6 bucks/day) Set starting amount (does this already) PHP Code:
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
So Fucking Banned
Industry Role:
Join Date: Apr 2011
Posts: 1,241
|
Oh wow that would be pretty cool.
From what I see it already has those variables. you could make moneySavedPerSecond = 5.47 to something like 0.00003 such that it would show slower on the count over time. you could also insert the variables via PHP so that it might show information that pertains to the visitors input on a previous form. I will play with it ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 | |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,231
|
Quote:
I'm bored if you have $50.
__________________
Make Money with Porn |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
<&(©¿©)&>
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
|
If you are looking to invest a few bucks to have it fixed, hit me up, icq: 33375924
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000 Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager ![]() Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,231
|
Here bro.
I took out all that stuff in the other script that actually did nothing and this is all you need. It adds 1 cent every second. PHP Code:
__________________
Make Money with Porn |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
see you later, I'm gone
Industry Role:
Join Date: Oct 2002
Posts: 14,058
|
http://madspiders.com/testcounter.htm
It is right now set to add .00006944 dollars every second which is about $6.00 a day. Pretty boring though because it only clicks off a cent every 2.5 minutes. PHP Code:
__________________
All cookies cleared! |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 | |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,231
|
I forgot you needed that to be set by time of day each time.
![]() Here is the script : Just set "dailyamount" to the dollar amount you want total for the day. I have it set to 500 dollars a day now in the script : Quote:
__________________
Make Money with Porn |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,231
|
Wait!
Do you want the total to rollover to the next day? I didn't do that. Sorry. But that's enough for free.
__________________
Make Money with Porn |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#10 |
So Fucking Banned
Industry Role:
Join Date: Sep 2010
Posts: 3,405
|
Rather than mess around with what you posted I wrote something that does what I think you're asking for. You can choose the amount per day and/or the start figure, and it increments in cents. And it's short (shorter than this post
![]() In the code below it's 1000 (or thereabouts) and 500 for the daily increase just to see it working, because $5/6 a day increases at a boring 1 cent every ~3 minutes. BTW the higher the daily figure the higher the start figure, because it's client side script. Everyone's computer clock is different and it needs a fixed base time to compare to, long enough ago to be in the past for the whole world, and the number will be different for everyone in the world. This isn't an issue with $5 a day, but with 500, as below, you might be wondering why it's so much over 1000. I must have misread your post because I thought you required commas. Rather than bloat it with another function I added a couple of lines for one comma, which is all you need for any number up to 999,999. If you start at $1000 and increase at $5 a day it will take about 550 years before that becomes an issue. I'll be happy to fix it if I'm around then. ![]() As for people asking for money for a few lines of jabbascript... are you shitting me? Hope it helps. Code:
<html> <head> <script type="text/javascript"> function saved(){ var start = 1000; // start figure (appr) var perday = 500; // amount per day increase var spd = 86400000/perday; var update = spd/100; var now = +new Date(); var basetime = 1305100000000; var dif = now - basetime; var money = dif/spd + start; var save = (Math.round(money*100)/100).toFixed(2); var len = save.length; var save = save.substring(0, len-6) + "," + save.substring(len-6); document.getElementById('txt').innerHTML="Our customers have saved $"+save+" with us. "; t=setTimeout('saved()',update); } </script> </head> <body onload="saved()"> <div id="txt">If you can read this something went wrong.</div> </body> </html> |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Registered User
Industry Role:
Join Date: May 2011
Location: USA
Posts: 60
|
I'll take a look in the morning, bump this tomorrow to remind me.
|
![]() |
![]() ![]() ![]() ![]() ![]() |