Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. AV software ties itself pretty deep into the OS, so it's not a good idea having two different kinds of AV programs installed at the same time.
  2. Daniel0

    Hello!

    When/if Kazzie-D becomes a Guru/PFR/mod/admin, I'll consider it.
  3. Daniel0

    Hello!

    *Daniel0 is awesome.
  4. You should choose the framework you like best and makes you the most productive. How do you find out which one that is? By testing them out.
  5. A hell of a lot of people would say programming isn't "cool". You must be going to the wrong parties. Or maybe he is going to the right parties?
  6. $ip = ip2long($_SERVER['REMOTE_ADDR']); if (ip2long('202.0.0.0') >= $ip && ip2long('203.0.0.0') < $ip) { // blocked } http://php.net/ip2long
  7. You probably already know this, but that's not valid syntax.
  8. Idealistic? They're not saying they'll block IE6. They're saying that they will stop supporting it. Basically they won't make any efforts trying to get things working (functionally and aesthetically). Basically, adamant and/or ignorant users who aren't upgrading are preventing them from using newer technologies. Dropping support for older browsers alleviates that. Note that they aren't only phasing out support for IE6, but also versions like FF2, Safari 2, Chrome 3, etc.
  9. From my experience, a lot of form spam is done by humans and humans tend to pass CAPTCHAs. The only way of catching that is by manually verifying everything/everyone or applying a spam filter that uses various heuristics for determining whether or not it's spam. Machine learning is of course way more difficult than simply writing a CAPTCHA script. There are various services (e.g. akismet) you can use for this.
  10. My combo is Firefox + Adblock Plus + Vimperator + Tree Style Tab (+ some other less significant stuff). Works well for me. I don't care what browser people use as long as they keep it reasonably upgraded. If they don't, they shouldn't expect that things will continue to work for them at least. I assume you mean the user agent string. See this: http://webaim.org/blog/user-agent-string-history/
  11. http://developers.facebook.com/news.php?blog=1&story=358
  12. Many of them are probably using some sort of CMS that's customized for their needs. Hell, even The White House is using Drupal.
  13. You can integrate that with PHP Unix man pages as well to get the full documentation. pear channel-discover doc.php.net pear install doc.php.net/pman Now you should be able to access PHP documentation like pman strpos. Then it's just a matter of setting keywordprg to pman for PHP files in vim.
  14. You haven't upgraded to Windows 7 unless the end result is that the operating system you're running is Windows 7.
  15. More like this if it's a form you want to use. <?php $updateitems=array('test1/test1.txt','test1/test2.txt','test1/test3.txt','test1/test4.txt','test1/test5.txt'); echo '<form method="post" action="http://localhost:80/updatefileonelocalserver.php">'; foreach ($updateitems as $item) { echo '<input type="hidden" name="items[]" value="' . $item . '">'; } // etc. echo '</form>'; ?>
  16. Pass an array using POST.
  17. Use preg_replace_callback or use the /e modifier.
  18. You're definitely doing something wrong if you need that many parameters!
  19. What do you mean with "hide"?
  20. How do you upgrade XP to Win7 by installing Linux?
  21. How is it confusing that you need to include upper case letters?
  22. This software is not written by PHP Freaks. Comments about the forum software should be directed to SMF over at http://www.simplemachines.org/
  23. That's not true. Object destructors and shutdown functions will still run after a call to die() or exit(). daniel@daniel-laptop:~$ cat test.php <?php class Foo { public function __destruct() { echo 'Destruct: ' . __CLASS__ . PHP_EOL; } } function shutdown() { echo 'Shutdown: ' . __FUNCTION__ . PHP_EOL; } $foo = new Foo(); register_shutdown_function('shutdown'); die(); echo 'This will not be output.'; ?> daniel@daniel-laptop:~$ php test.php Shutdown: shutdown Destruct: Foo
  24. It isn't needed. In fact it's discouraged as of PHP 5.
  25. Untested. <?php $db = new PDO('mysql:host=localhost;dbname=test', 'user', 'password'); $string = 'my name is David'; $words = explode(' ', $string); $stmt = $db->prepare('INSERT INTO words (word) VALUES(?)'); foreach ($words as $word) { $stmt->execute(array($word)); } Or using PHP 5.3 and anonymous functions (still untested): <?php $db = new PDO('mysql:host=localhost;dbname=test', 'user', 'password'); $string = 'my name is David'; $stmt = $db->prepare('INSERT INTO words (word) VALUES(?)'); array_walk(function($word) use ($stmt) { $stmt->execute(array($word)); }, explode(' ', $string));
×
×
  • 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.