-
Content Count
1,210 -
Joined
-
Last visited
Everything posted by pyost
-
How To Make A Value In The Database Raise Every Minute.
pyost replied to Feelay's topic in Programming
Cron jobs can be useful at times, but here they would be too much. You would have a script that runs every sixty seconds and updates all the players. Sure, for only several players it is OK, but just imagine updating several thousands of players - it would definitely put immense load on the server (unnecessary load, that is). -
How To Make A Value In The Database Raise Every Minute.
pyost replied to Feelay's topic in Programming
First of all, you need to take into consideration only those scripts that display/access a player's health. When such script is ran, it should retrieve the data from the database, check whether the player's health should be updated, and act accordingly. This is how I would do it. Let's suppose you have already retrieved $health and $updated. The first variable contain the current health, and the second when the health was last updated (UNIX timestamp). $currentTime = time(); // we need this in order to calculate how much time has passed$difference = $currentTime - $updated;$addHealth = floor($difference / 3600) // we need to know how many hours have passed - we get an round value (though it is a "float" number) by using floor()$addHealth = (int) $addHealth * 5 // this is how much health will be added, if you add 5HP per hour - I'm not sure whether (int) is necessary, but better safe than sory$health += $addHealth;if ($health > 100) { $health = 100; } // we don't want the health to go over 100!$updated = time(); // we also need to update the alteration time. Now you would just need to enter the new value of $health and $updated into the database, without the need to read them again in this script. I have not tested this code, so it might not work properly. -
Application For Free Hosting Looks A Little Bit Strange
pyost replied to java-area's topic in Web Hosting Support
You are not supposed to hit reload/back while the page is loading - after it has been loaded, you are usually safe to do whatever you want, and this would apply to most web sites with this kind of a warning. Not that this has something to do with your application. Before you activate your hosting account through the script you accessed, you need to post a hosting application in this forum (before doing so be sure to read all the rules and requirements for a hosting account). Once it is approved by an administrator, you can activate your account with the mentioned script. -
How To Make A Value In The Database Raise Every Minute.
pyost replied to Feelay's topic in Programming
Don't update it all the time, only when the value is required. You would just need to remember the last time the value is updated, calculate how many minutes have passed, and then set the new value accordingly. Not only will you put less load on the server, but you will also avoid using cron jobs -
Let me just say this: Talking seriously, my vote goes to Windows XP. Obviously, it has the best features/stabilty balance. Vista has loads of things to offer, but it is still not as stable as XP. I was able to use my WinXP installation for over two years without reinstalling it, or even repairing in any way, so this must definitely be a plus. But after the first crash, several months ago, I switched to Linux, so I might not be the most objective person
-
I Cannot Format My C Drive....pls Help
pyost replied to Abhi1405241549's topic in Websites and Web Designing
There is no need to download full Linux operating systems such as Knoppix and Ubuntu. Instead, download the GParted LiveCD, which is approximately 50MB in size, and use it to format the drives. Since it doesn't depend on Windows in any way, the operation should go smoothly. -
Strange Ascii Code 22 Character Detected In Connection String
pyost replied to Eggie's topic in Programming
Yes, I'll agree with him. It must be on a global level, so I'm pretty sure other people have troubles with their web sites, too. The host would probably be able to ignore your problem, but this way they have a lot more to deal with. -
Strange Ascii Code 22 Character Detected In Connection String
pyost replied to Eggie's topic in Programming
It seems to be a cPanel error, but I have no idea how this characted could have appeared. Do you have access to cPanel on that host? If you don't, I don't think there is anything you can do. Except contact your host's support team, of course. -
You might want to try a program called "Auto Mouse" I used to use it for a web-based MMORPG that required you to spend an hour or so clicking the same button over and over again, every 30 seconds or so, and it served well. Later I found other uses, for example resizing a large number of images (I know there are special programs for this, but I couldn't be bothered).
-
How Do You Set Up A Domain E-Mail Address? I dont understand =/
pyost replied to Feelay's topic in Web Hosting Support
Oh, that Yes, you can. It is all done through cPanel's mail system. Log in into cPanel with you username and password, and there should be several icons on top concerning e-mail setup. They allow you to create regular e-mail accounts with your domain name, as well as those address that only redirect mail.However, since you do not own fantasieworld.com (correct me if I'm wrong), but fantasieworld.astahost.com, your e-mail address would look like admin@fantasieworld.astahost.com, which is ridicilous if you ask me. You are better of with Hotmail in that case.I usually re-route all the mail sent to a certain address on my domain to GMail, and then reply with the same address from GMail (a feature I discovered just recently, and find it absolutely great). -
How about this? http://forums.xisto.com/no_longer_exists/
-
I've managed to modify my primary nameserver (I am hosted at Xisto - Web Hosting) through GoDaddy with no problems at all.
-
I can access your main site, so you can rule out an Xisto system problem. If you have modified the nameservers recently, give them more time to populate the data - after a day or two everyone should be able to see your site.
-
I'll confirm this You can be hosted at both Xisto and Xisto, since there is no reason for this kind of rule to exist. Judging from your posts, you should be able to maintain your credits at Xisto fairly easy, if your accounts gets approved. I wouldn't worry about the latter, though, as your posts are a great example of how to post quality well-written messages.
-
How Do You Set Up A Domain E-Mail Address? I dont understand =/
pyost replied to Feelay's topic in Web Hosting Support
I suppose you are talking about the PHP mail() function? It can be used to send e-mail to any address you enter - or at least attempt to send it in case the e-mail address is invalid or isn't being used. $to = 'example';$from = 'awards@google.com';$subject = 'You have just won 49 per cent of Google\'s shares!';mail($to, $from, $subject); This is the easiest way to use mail(), and will work even though we aren't using a proper address. In order to test it, just enter your own e-mail address in the $to variable. -
Simple Ubuntu Based Home File Server | For Newbies
pyost replied to dserban's topic in Websites and Web Designing
This link might also prove to be useful: https://help.ubuntu.com/community/ApacheMySQLPHP Instead of using the server version of Ubuntu, here you can find out which packages to install in order to run a server from a desktop Ubuntu machine. Quite easy to understand, and it's been a lot of help to me. -
I suppose you are talking about pre-made template, and not people ready to offer their design services for free. If so, the following links ought to fill your needs: https://www.google.com/search?q=free+web+templates
-
Yes, it is.
-
Exactly We celebrate Christmas on 7th January, so it does tend to create some confusion with foreigners We also don't pay much attention to Christmas - New Year's Eve is when everybody gets presents
-
Happy holidays And a Merry Christmas to those celebrating it right now/tomorrow
-
All users hosted through Xisto are on the Gamma server. In order to check its status visit this page. At the moment of speaking, all services are online and functioning properly. However, I cannot access faqs.astahost.com either
-
Merry Christmas & Happy Holidays! From AstaHost Team :)
pyost replied to x2envi's topic in Alerts, News & Announcements
...Not to mention that some celebrate Christmas in January ;)Anyway, happy Christmas, New Year, and whatever you celebrate! Enjoy the holidays -
Exactly the same goes for me - except I installed it on a desktop machine, not a laptop one. So far, so good. Makes web development and site administration (i.e. through SSH) easier and faster than in Windows.
-
Nice to hear this, but it will still be years before we can stop checking out web page in Internet Explorer 6 (don't know about IE7's rendering system, though). If IE8 is released in 2008, who knows when it will become the most used Microsoft browser. If I am not mistaken, IE6 is still used by the majority of people, and look at how long ago IE7 was released.