Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. You own one of those domain squatting porn sites?
  2. No. Try to run this <?php echo "first string"; sleep(10); echo "\nsecond string"; ?> from a web server and then from CLI. You'll find that I am correct.
  3. Yes. No country owns .com. It was originally intended for commercial websites but is now being used as "miscellaneous"/"international". A lot of American websites use .com instead of .us as well which is an actual TLD meant for the United States.
  4. You can't get your own TLD (except if you get your own country that is). Also, you can't just go to "com", "net", "org" or whatever.
  5. http://php.net/curl
  6. Well, a pro would be that you've got a nice separation of the code which makes it easier to maintain and reuse.
  7. Any specific reason why you won't run it all at once?
  8. $this->datadisplay[$val] = $tval;
  9. You could refresh and do stuff like ?step=1 and ?step=2 and such if that's what you mean?
  10. Are you using clean URLs? If so, then use absolute paths to your CSS files. E.g. CSS file is at /stylesheets/default.css (referenced as stylesheets/default.css in a link tag) URL (before): http://example.com/articles - link tag points to http://example.com/stylesheets/default.css URL (new): http://example.com/articles/ - link tag points to http://example.com/articles/stylesheets/default.css (doesn't exist) I hope you understand my example.
  11. Since you can't decrypt MD5 hashes that would probably not be a good idea (unless you never intended to read the bug reports).
  12. You can print it out while reading it, but Apache (or any other web server) won't send the data before the script is done executing so you wouldn't notice. The only way you would notice is if you are using the script from command line
  13. The two snippets you posted do the exact same thing. The point in doing the first would be to decrease the amount of code in your script.
  14. FYI PHP can be used for other things than requests through a web server. See the post above mine.
  15. I did some testing... It seems that I was incorrect and that sha256 is slower than md5. Here are the results of all the algorithms by hash(): crc32 0.001149ms crc32b 0.001227ms adler32 0.001346ms md4 0.001427ms md5 0.001443ms sha1 0.001751ms tiger160,3 0.002028ms tiger128,3 0.002068ms tiger192,3 0.002098ms sha256 0.002297ms tiger192,4 0.002326ms tiger160,4 0.002328ms ripemd256 0.002389ms ripemd128 0.002391ms ripemd160 0.002510ms ripemd320 0.002560ms haval224,3 0.002641ms haval128,3 0.002678ms haval192,3 0.002682ms haval160,3 0.002695ms haval256,3 0.002759ms tiger128,4 0.002893ms haval160,4 0.003088ms haval256,4 0.003107ms haval128,4 0.003120ms haval192,4 0.003130ms haval224,4 0.003176ms haval128,5 0.003286ms haval256,5 0.003313ms haval192,5 0.003317ms haval224,5 0.003346ms haval160,5 0.003350ms whirlpool 0.004696ms snefru 0.005016ms gost 0.005208ms sha384 0.006023ms sha512 0.006140ms md2 0.027228ms Total execution time 13.424612s (ordered ascendingly by speed) The code I used is: <?php set_time_limit(0); class Timer { private $start_time; function __construct() { $this->start_time = microtime(); } function get_time() { $start_time = explode(' ', $this->start_time); $stop_time = explode(' ', microtime()); $start_time = $start_time[0] + $start_time[1]; $stop_time = $stop_time[0] + $stop_time[1]; return $stop_time - $start_time; } } $global_timer = new Timer(); $string = "ASj¤%&sld7%¤ASJf/&83sjd"; $algorithms = hash_algos(); function get_time_hash($algorithm, $string, $times) { $timer = new Timer(); for($i=0; $i<=$times; $i++) { hash($algorithm, $string); } $end_time = $timer->get_time(); $average_time = $end_time / $times; return $average_time; } $times = array(); foreach($algorithms as $algorithm) { $times[$algorithm] = get_time_hash($algorithm, $string, 100000); } asort($times); foreach($times as $algorithm => $time) { echo sprintf("%-15s %.6fms\n", $algorithm, $time*1000); } echo "\nTotal execution time ", sprintf('%.6f', $global_timer->get_time()), 's'; ?>
  16. Daniel0

    Layout Setup

    If you with "the vertical lines on the left and right" mean the page border then you could just take a 1-pixel high slice of the background and repeat it on the y-axis.
  17. It should be 'loggedin' and not loggedin unless you have a constant named loggedin. See: http://www.php.net/manual/en/language.types.array.php#language.types.array.foo-bar
  18. You could use the hash() function to choose between a variety of different hashing algorithms. From what I remember, sha256 should be just as fast (or faster) than md5.
  19. Well, it's just a string so you could use 'AS d©#¤672¿' as well if you would like to.
  20. Would you care to read the description of this forum?
  21. The server is probably set up like that. Is it your site? If it isn't then you can't do anything about it.
  22. Use DOM to step through the HTML and replace as you would like to.
  23. http://dev.mysql.com/doc/refman/5.0/en/select.html
  24. Here is a list of screencasting software. You can use any type of video editing software to add voice to it afterwards if the software you choose doesn't support doing it while you are recording.
×
×
  • 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.