Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. It is possible doing something like it, assuming your web server is not setup to always buffer the output and that your browser doesn't try to load the entire thing first. <?php header('Content-type: text/plain'); $i = 1; while ($i <= 100) { echo $i++ . PHP_EOL; flush(); ob_flush(); usleep(500000); } Live example: http://files.degeberg.com/flush.php This works for me in Firefox 3.6.3, but not in Chrome 6.0.422.0 dev.
  2. Because you can only address 256 different integers using 1 byte. You have 4 byte = 32 bits, which gives you 232 = 4,294,967,296 different IP addresses. Some of the ranges are reserved, so the actual number is lower. Edit: Fixed typo pointed out by Philip.
  3. As the sticky topic in that board mentions of course http://www.phpfreaks.com/forums/index.php/topic,167887.0.html
  4. Google decides based on what it thinks is best. You can't change it.
  5. It's just examples of product names. It's not supposed to reflect market share or whatever.
  6. Try using the -H option as well. That will override the HOME environment variable.
  7. You need to put the while at the end of the do instead of the if.
  8. Encryption is by definition reversible. There exists no such thing as "one-way encryption"; you're thinking of hashing, which is a different technique.
  9. Yes, if you substitute MD5 with SHA512. You really should just do like this though (or using another algorithm than SHA512 if you wish): $hash = hash_hmac('sha512', $password, $salt);
  10. It's likely set in the vhost configuration for the domain names.
  11. open_basedir is turned off. In the PHP.ini it's commented out. Apparently it isn't turned off if you are getting open_basedir restrictions. Configuration settings can be set a number of different places: http://dk.php.net/manual/en/configuration.changes.modes.php
  12. Word is that its not good to use <?= and <?, you should always use <?php. It's perfectly fine using those if you have control over the environment(s) that your PHP script will run it.
  13. It's talking about methods in the PDOStatement class
  14. If you buy a book on PHP 6, you're being scammed. There exists no such thing as PHP 6 right now. These kind of books only exist because there are greedy and/or stupid book publishers that decided it would be a brilliant idea to release books about a development branch without even an alpha release.
  15. crc32 returns a signed integer. Try converting it to its unsigned string representation as the example in the manual shows.
  16. Because that's apparently where you're copying to/from. Check your code for a call to copy(). Either stay within the paths specified in open_basedir, or turn it off.
  17. Or if you're using PHP 5.3.0 or later: http://php.net/manual/en/datetime.diff.php
  18. Is this for real? That's a shitty exam. What value does it have being able to memorize the API? It certainly doesn't make you a good programmer. Anyways, all of them are valid methods, except for fetchClass().
  19. http://www.faqs.org/rfcs/rfc821.html
  20. Having Paris Hilton speak on your website, and not annoying your users are mutually exclusive.
  21. Run it like this: sudo -u TheMatlabUser /path/to/the/script.sh Then add the following to the sudoers file: TheMatlabUser ALL=NOPASSWD: /path/to/the/script.sh
  22. You'll have to convert the config file to ;-style comments. If you're using any half-decent editor, you can just use its search and replace feature.
×
×
  • 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.