Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

0 Neutral

About Adaaam

  • Rank
  1. Okay fine can you tell me if there is a different function I can use to round 32 to 30 or 49 to 40 or 56 to 50 or 114 to 110? I'm asking for help here...
  2. Yes I've tried the manual, maybe you can explain?
  3. Hi all, I have an array of elements which is dynamically set but for testing purposes I have this code: <?php $items = array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32); $count = floor(count($items)); var_dump($count); This returns float(32) but I want to know why it doesn't return the rounded down value of 30? I must be missing something or misunderstanding the function but if someone could explain why this is happening and how I can fix it then that would be great Thanks, Adam
  4. Well I'm sort of working on an instant messaging thing where users can send messages to each other, not just one big chat room if you know what I mean, like Facebook where you can message different people. I mean I haven't written any code for it yet I was just thinking it out to get an idea of how I could do it. I just wanted to make sure I wasn't going to kill the server with Ajax requests Also I'll have to look into database caching.
  5. Thanks for the help I know this may sound lazy because I don't know alot about node.js, but lets say I don't use long polling and just make an AJAX request every 2 minutes to get new messages for a user, would that have a big impact on the server? I know it's hard to tell because I don't have any details regarding the number of clients or anything like that but what do you think? Thanks, Adam
  6. Hi all, I need some guidance on how I can build an AJAX/PHP chat application, sort of like an instant messaging thing like the one on Facebook. It doesn't have to be anything fancy as long as it works. I have some ideas as to how I can build it but I've never tried to do anything like this before so I'm a bit lost. I'm confident I can build the entire PHP side of things up until I have to use AJAX, then I'm stuck. The main concern I have is the affect it will have on the server, lets say I have a Javascript timer to check for new messages sent at certain intervals, wouldn't that have a massive affect on the server? I can only think of using a timer to get new messages for each user, I can't come up with any other way to get it to work. I just don't want to kill the server with AJAX requests if that's even possible. So really my question is, would it be okay to use a timer to get new messages of each user at certain intervals, or is there another way of doing it? Hope this makes sense Thanks, Adam
  • 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.