Search results

  1. W

    What's wrong with this?

    I output the source of index.html from the class too and it looks the same(aside from the inclusion of the HTTP headers at the top). Very strange. Also, TechAsh, can you attach the complete cpanel class? I noticed from the code you just showed that the one I got is not the one you're using...
  2. W

    What's wrong with this?

    It would actually be (float) or (double) to maintain accuracy. But php autocasts anyway so that can't be the problem. What do you mean by you checked that the function's output is correct? You mean you checked that $cpanel->getBandwidthUsed() returns the correct value? I can't see how it could...
  3. W

    Cron / Perl problems

    Try updating all of them with a single query. This would probably be much quicker than looping through all the results in perl and updating each one. It's a little complex since you don't want it to go over maxhp, but it's possible. UPDATE users SET hp = (hp + (hp * 0.15)) - ((hp + (hp * 0.15)...
  4. W

    POST without submit

    You might not have heard of or know much about AOL since you're in Belgium. But it's not uncommon for an AOL user to get a different IP for *each* page request. I'm not sure if there are other ISP's in the world which have a similar system, but I made that statement about IP's subject to random...
  5. W

    PC or Console Gaming?

    I always say I prefer PC games, but I'm really not sure. The most memorable games I've played were all console games. Most of them are from the old arcade to SNES era, but there were good times with some later ones too(Super Smash Bros, Mario Kart 64, F-Zero X, and Goldeneye 007 namely). I...
  6. W

    POST without submit

    If someone manages to hack your server, then them looking at your sessions is the least of your worries. Like marshian said, their only real flaw is that they can be hijacked. However, some ISP's randomly assign new IP's to their users or put multiple people under the same IP, so comparing IP's...
  7. W

    POST without submit

    The only more secure way to store the data is to have the user login and store it in the database. But even then, unless you want to make people login for every page they access, you need a way to store who that person is. Sessions are the most secure way to store temporary data without...
  8. W

    Apache forbidding file viewing

    Just a note. The Indexes option allows people to browse all the files in a directory if it doesn't contain an index file. Unless you want that behavior, I would recommend removing the Indexes option. <Directory "C:/"> AllowOverride All Options FollowSymLinks MultiViews +Includes Order...
  9. W

    Using External HTML Files

    Ah I see what you meant. But I'm not sure what you mean by the php is executed before the file is included. file_get_contents() reads *all* of the contents into a string. It's just like calling fopen(), fread(), fclose(). The only way the php would be executed is if you request the script...
  10. W

    PHP session ID

    Actually, it isn't you. supajason's code is fine, except that he used $ses_id to store the id but then used $sid in the echo. So just change $sid to $ses_id or vice versa and it should work fine.
  11. W

    POST without submit

    Personally I would just put the data in the user's session and remove it in the next page. That's a lot easier than having to generate it in the html in my opinion. You could just use: Page 1: session_start(); $_SESSION['name'] = 'value'; Page 2: session_start(); $value = $_SESSION['name']...
  12. W

    Copyright law question

    You don't need to worry about anything. The name is too indistinctive to have any legal backing. Since 'sig' is now common internet slang, merely adding chat, another common word, doesn't make it distinct enough. It can be considered the same as SignatureChat. If the term is too general, it...
  13. W

    Using External HTML Files

    What do you mean? There is no 'or'. file_get_contents() reads all the contents of the file, it doesn't sometimes decide to execute the php :P
  14. W

    Using External HTML Files

    Using include without the parentheses is actually the preferred way since adding them forces the processor to evaluate the enclosed content before including. Albeit the overhead is minimal if not negligible, but I just wanted to point out that parentheses aren't needed. The current method...
  15. W

    Send multiline PHP variable to javascript

    Try using: $string = str_replace("\n", "\\n", $string); echo "<script>var string='$string';</script>"; This should translate newlines to the literal escape characters which JS should then translate back to newlines.
  16. W

    Mind mapping open source software

    http://en.wikipedia.org/wiki/List_of_mind_mapping_software That was like the second result in a google search :P There's 4 open-source projects listed there -- 2 in java, 1 in ruby, and 1 in php. From the screenshots, it looks like at least WikkaWiki and VUE go beyond purely hierarchical diagrams.
  17. W

    Help fixing PHP error in PhpBB

    Well, in that case try leaving in the BEGIN and END's and deleting the $template->assign_block_var()'s. Then change the code starting on line 77 to: $template->assign_block_vars('administer_points', array( "USER_NAME" => get_username_string('full', $u_id, $user_points['username']...
  18. W

    Need some javascript help

    No problem. Thanks for the credits ;-)
  19. W

    How do you add your own custom forum header

    Here's a tut from a google search: http://www.easytutorials.org/phpbb3_styles_logo.html
  20. W

    Need some javascript help

    Ah, I see. I think the best way to do that would be by doing this in the tb_show() function: var queryString = url.replace(/^[^\?]+\??/,''); var params = tb_parseQuery( queryString ); window['queryParams'] = params; So that it creates a global variable named queryParams. And then change the...
Top