Jump to content

xyph

Staff Alumni
  • Posts

    3,711
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by xyph

  1. You want a random hash? <?php $random = mcrypt_create_iv(32, MCRYPT_DEV_URANDOM); $hash = strtoupper( md5($random) ); echo $hash; ?>
  2. mbstring is a different extension than ereg. Why mbstring uses POSIX rather than PCRE, I don't know
  3. Associative array strings need to be quoted. You should be coding with error reporting on - the code you posted should be giving you undefined constant notices.
  4. Agreed, on both points. I can volunteer to write that one, if you guys will proof it for me Talk is cheap!
  5. That's one of the reasons I leave SEO to other people. It's disgustingly predatory, and something I don't want to bother competing against. User-generated content aside, it's very easy to prevent links going to the kind of sites that will dick you around. Even with user-generated content, it's quite easy to build a list of external URLs in the content and keep an eye out for bogus links (almost always from bogus users). nofollow helps with this as well. Stack Exchange links to external articles in nearly every post, yet the are constantly at the top of search results. I don't think screwing with the way your user's browser behaves is a solution to someone poisoning your content.
  6. I've purchased a few of their desktops, but they were incredible bargain priced (sub $300) so my expectations were never high. Since they were desktops, I never had to deal with support. They are still running today (or at least I assume since I haven't got a phone call asking to fix them). I've heard horror stories though. It's very sad they took over the legendary ThinkPad line :/ That's one BIG plus of purchasing with credit cards. You get shafted hard enough, and you just initiate a charge-back. Sure it looks bad on your credit rating, but it gives a nice 'fuck you' to the assholes that made you do it.
  7. I can watch this show over and over and over and still fall out of my seat laughing. For the life of me, I don't understand why they only made 12 episodes. I can still watch all of them and laugh at every single one. John Cleese has been great in every role I've ever seen him in, but Fawlty Towers is by far my favorite. You must not be familiar with Life of Brian, Quest for the Holy Grail, Meaning of Life, and the Flying Circus
  8. Those kinds of headers. Not that header in particular.
  9. ORDER BY class_assignment might get you started
  10. unset($_SESSION) is dangerous, and can cause hard-to-debug issues. Use $_SESSION = array(); instead to wipe session data.
  11. yes sorry, what im trying to do is make the referrer look like its coming from somewhere else eg google.com, i have read that article and i will read through it again, im thinking that this maybe isnt possible. It's not. You're trying to change client-side behaviour with server side scripting. Even client-side code can't or shouldn't be able to do this. Messing with those kinds of headers could be a security risk.
  12. Much needed. The manual entry is very well done, and this is just icing on the cake! Now we just need a sticky for the 'expects a resource - boolean given'
  13. And your code simply prevents the output of the error message, rather than FIXING THE ERROR.
  14. I'd probably just add another column myself... But 'status' for me is usually limited to 'Complete', 'In Progress', or 'Not Started' It really depends on how flexible you need to be with your status. Generally, if you only have a few different options it's not worth it to move over to a foreign key.
  15. You're clearing what should be an empty output, which does nothing. If it's errors that are getting cleaned, you're suppressing something very important to proper script execution. It's good that you're trying to help, but please understand what your code is doing before offering it.
  16. "should always way up the benefits" should be "should always weigh up the benefits"
  17. Fawlty Towers was great. Many a good, relaxing night with John Cleese in charge of the entertainment.
  18. Check for output buffers! Since you don't seem to be adept in google-fu, Use this - <?php // Comment everything out to check for errors //header("Content-Type: application/vnd.ms-word"); //open/save dialog box //header('Content-Disposition: attachment; filename="syllabus.docx"'); //read from server and write to buffer //readfile('uploaded_files/syllabuses/syllabus.docx'); if( ob_get_level() ) die("You've got buffering issues"); ?>
  19. This topic has been moved to MySQL Help. http://forums.phpfreaks.com/index.php?topic=364838.0
  20. You're probably outputting something along with the file. Check and make sure the output buffer isn't turned on.
  21. If a user doesn't want to support cookies, it's best not to allow them to maintain a session. Passing it through the query string is dangerous, as it exposes the ID to the user themselves making accidental compromise and potential fixation easier.
×
×
  • 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.