Jump to content

PHP and Page Hits


HenryC

Recommended Posts

As you may have seen by previous post's i own a sub4sub website for a community of people, the way i have it set up is users click on other members sub button to gain points and recieve subs and everytime they click the button it refreshes the page so more people can show up by the results query, every refresh counts as a hit and i am having trouble with my host because im getting to many hits, i am just wondering is this the way to do it correctly? or could i maybe use something like ajax where i dont have to refresh the page which means it wont count as a hit and stop it using up too much CPU.

Link to comment
Share on other sites

As you may have seen by previous post's i own a sub4sub website for a community of people, the way i have it set up is users click on other members sub button to gain points and recieve subs and everytime they click the button it refreshes the page so more people can show up by the results query, every refresh counts as a hit and i am having trouble with my host because im getting to many hits, i am just wondering is this the way to do it correctly? or could i maybe use something like ajax where i dont have to refresh the page which means it wont count as a hit and stop it using up too much CPU.

 

What kind of a Piece of shit host do you have?  Please let us know the name so we can tell people to avoid them.

 

In a nutshell, yes you can use ajax.  In general we advocate that people who don't already have a good command of javascript and ajax used jQuery.  With that said what they are complaining about will probably not be satisfied, since the ajax call will still be generating mysql load and bandwidth load.  It might make things better if there's a massive amount of queries and things going on with a normal page load. 

 

There are ways to ease database load that have nothing to do with cutting down on the number of pageloads -- things like opcode/page caching (APC) and in-memory database caching (memcached).

Link to comment
Share on other sites

I'm using hosting24.com, when i first transferd my site only me and my staff new the new address, within 5 minutes the site was down to CPU, the live chat said its becuase i recived over 600 hits %20 CPU within 5 minutes and they only allow 600 in 5 minutes, they said it might be becuase i am using a chatroom which is the phpfreechat script, but even when i took that off and replaced with a forums i was still getting it, my site allows the user to sub to 30 people an hour so if 20 users do that within 5 minutes it will go down, thats pretty bad if you ask me.

 

I mainly code in PHP and have done through the years so i don't have much knowledge in ajax or so..

 

Also does it realy matter how low mysql bandwidth i use if it will still count as a hit anyway?

 

Also hosting24 have unlimited space and bandwidth.

Link to comment
Share on other sites

I'm using hosting24.com, when i first transferd my site only me and my staff new the new address, within 5 minutes the site was down to CPU, the live chat said its becuase i recived over 600 hits %20 CPU within 5 minutes and they only allow 600 in 5 minutes, they said it might be becuase i am using a chatroom which is the phpfreechat script, but even when i took that off and replaced with a forums i was still getting it, my site allows the user to sub to 30 people an hour so if 20 users do that within 5 minutes it will go down, thats pretty bad if you ask me.

 

I mainly code in PHP and have done through the years so i don't have much knowledge in ajax or so..

 

Also does it realy matter how low mysql bandwidth i use if it will still count as a hit anyway?

 

Also hosting24 have unlimited space and bandwidth.

 

600 hits in 5 minutes really isn't all that much. I don't really know how you want to define "hit". Ajax simply accesses a page without reloading the current page. You are still loading the PHP file and executing everything in it, so it really doesn't make a difference whether you access it with Ajax or not. The only minor difference is that you may not have as many includes and other things going on if you only access one file rather than through your whole system, but, you're still accessing a PHP file and doing database calls and such, and I reckon that is what they are bitching about.

 

Every respectable host has "unlimited space and bandwidth". The reality, however, is that it is not at all unlimited. That is just a marketing gimmick. Most of the time "unlimited" is actually quite a small limit.

 

If you want to maintain a respectable website that can scale well, get yourself a VPS. Try http://linode.com

Link to comment
Share on other sites

Yes, linode, aws, something better than hosting24.  Most bargain basement hosts seem to have these restrictions.  600 "hits" could happen on one page.  If they really mean 600 page views in 5 minutes, that is ridiculous.  They sound like total scam artists, who basically want a bunch of people paying them squat per month, but having websites that get little to no traffic, so they can load 500 at a time on one server. 

 

We are huge fans of linode here, but they are going to cost you $20/month.  I'm guessing you're paying a lot less, but as they say, you get what you pay for. 

Link to comment
Share on other sites

Well i don't have much money to buy a better host just yet, there first package that is $19.99, would that cover a lot of hits per 5 minutes do you think?

 

Yes.  You get a xen based virtual private server running a linux distro of your choice.  I'd recommend Centos.  As one example, this site runs on a 512:  http://www.flingbits.com/ and includes not only the full site, but various development and planning tools we use and an irc server. 

Link to comment
Share on other sites

Well i don't have much money to buy a better host just yet, there first package that is $19.99, would that cover a lot of hits per 5 minutes do you think?

 

Do you have a way to see how much disk space or bandwidth you have used for a month?

 

Compare that to a linode package. Linode doesn't have arbitrary limitations. You get so much server resources and so much bandwidth which depends on what package you get. When you use up either, that's your limitation.

Link to comment
Share on other sites

oh hmmm.

 

There is no such thing as unlimited bandwidth.  The host is constrained by the networking, so when the say that they offer unlimited bandwidth what they really mean is that they have some limit they aren't going to tell you about until you hit it, like their ridiculous 600 pages/5 minutes rule (and that was documented where exactly?) and on top of that, you are hosted on a machine with many other customers, that has a physical limit related to how many nics the machine has and the speed of those. 

 

Here's a good idea of the quality of hosting24.  First off they are the "paid" hosting arm of a Lithuanian based outfit that has a "free" hosting business, where there are plenty of people claiming that they had an affiliate deal that never paid anyone.  All the signs of a crappy company:

 

 

Lots of obviously planted reviews here claiming how great they are interspersed with real customers who all say that the company sucks. 

 

http://www.webhostingstuff.com/review/Hosting24com.html

 

Here's an example:

 

" The uptime is like 50%. Half the time you try to access your site, it is down. Backups do not work. You cannot download more than 10 meg from their host. The server is slower than my 12 year old pc. And if you are getting any kind of traffic (like 100 hits per day, not a lot), it gets even slower, comes to a crawl and breaks down. And then ... they blame you for running "slow queries", and say you violated something, and just take your site down without any warning. And then you are screwed, because the backups do not work - remember? And they won't let you get any data after they cancel your account, they'll claim it all has been destroyed.

In two words, if you fall for this "service", you should leave any hope of ever getting any data you website collects back from them.

 

If you are still not convinced, be sure to read this:

http://000webhost-scam.blogspot.com/ - a detailed account of my (and other people's ) experience with this hosting.

Also be sure to google "hosting24 scam" or "000webhost scam". There will be lots ofr interesting reading as well. "

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.