Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. Try this one: http://www.keybr.com/ Much harder when some of the words aren't real and it isn't real sentences.
  2. Something seems to be wrong with my GTK installation. The menus have started to act weird after an upgrade. See the screenshot taken from Pidgin below. Has anybody else experienced this or know how to fix it? This is what I'm using: http://sourceforge.net/project/showfiles.php?group_id=98754&package_id=121281&release_id=497042
  3. It's a standard feature of SMF (the forum software we use here). It's only highlighting PHP code though.
  4. Yeah, we're using SMF though :\
  5. Which color modification?
  6. How doesn't it work?
  7. Use number_format().
  8. What do you mean with standard? It's enabled by default in PHP5.
  9. Are you sure that's the full path to where your files are? Try to do echo getcwd(); to see where your script is located.
  10. That's how you'd do it. You need write permissions in the folder which you are creating the new folder in. In the code you posted you'll create the folder at the root of the HD. You'll most likely not have write permissions there.
  11. Try this: <?php $banned_ips = array( '150.208.193.*', '179.155.3.2', ); $user_ip = $_SERVER['REMOTE_ADDR']; $is_allowed = false; foreach ($banned_ips as $ip) { $octets = explode('.', $ip); $num_octets = count($octets); if($num_octets > 4) continue; // malformed IP address $ip .= str_repeat('.*', 4 - $num_octets); $ip = str_replace('*', '[0-9]{1,3}', $ip); if (preg_match('#^' . $ip . '$#', $user_ip)) { $is_allowed = true; break; // no need to check the remaining addresses } } if (!$is_allowed) { die('Sorry, you are not allowed to view this page.'); } ?>
  12. Based on the error you posted I'd guess that you somewhere are missing whitespace between the PHP opening tag and the call to require_once().
  13. I hope that answers your question.
  14. Here is a more visual example. Perhaps that'll help with the understanding <?php $var1 = 'abc'; $var2 = 'def'; $var1 .= $var2; // $var1 now contains: abcdef // this is the same as: // $var1 = $var1 . $var2; //--- $var1 = 'abc'; $var2 = 'def'; $var1 = $var2; // $var1 now contains: def ?> You can do that with any operator, e.g. $num += 5 (add 5 to $num (the same as $num = $num + 5)).
  15. That doesn't make sense. You obviously cannot parse a file which doesn't exist...
  16. Do $var = "page.html"; instead. Otherwise the filename would literally have to start and end with a double quote which is not possible.
  17. The dot ( . ) is the concatenation operator, so if you put it before the assignment operator then the right operand will be added to the left operand (not added in the arithmetic sense, but by sticking things together).
  18. It doesn't necessarily have to be either of those two. The hash extension provides a multitude of other hashing algorithms which you can use. That extension is enabled by default in PHP5.
  19. The ISO 8601 standard uses the format YYYY-MM-DD which it appears that sitemap.org also uses. MySQL uses that standard for it's dates as well. Just add header('Content-type: application/xml'); to your file before outputting anything to change the mime type. Then just output valid XML and you should be fine.
  20. I'd go with the second option as well.
  21. The extension of the page doesn't matter, it's the format and the MIME type which you declare it as which counts. If sitemap.org uses ISO 8601 type dates, then it should be no problem using the date from the database. Otherwise you can change it using a combination of strtotime() and date().
  22. I've previously considered using a dvorak keyboard, but there a couple of reason why I don't. 1) I'm afraid that once I've gotten used to the dvorak layout I'll have trouble writing on standard QWERTY layouts and 2) I can't be bothered to find out how to replace the keyboard on my laptop and where to purchase a new one.
  23. Not entirely true. If you're using Windows Vista it is. IE6 is too tightly coupled to the Windows XP kernel which makes it impossible to run IE6 on Windows Vista that uses the newer NT 6.0 kernel. As far as I know has nobody succeeded in getting IE6 to work natively and full functionally under Vista. As seen in the screenshots I posted earlier in this thread I'm using Vista which means that'll I'll have to run an earlier version of Windows in a virtual machine in order to run IE6.
  24. You'll have to discuss that with the SMF team.
  25. I have already dropped it seeing as I cannot run IE6 alongside IE7.
×
×
  • 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.