Jump to content

brendandonhue

Members
  • Posts

    65
  • Joined

  • Last visited

    Never

Everything posted by brendandonhue

  1. You'll run into an integer overflow at the point.
  2. PHP's built-in GD functions don't support this. You can use ImageMagick, or a PHP class to write animated GIFs.
  3. A filename ending in ".jpg" doesn't guarantee the file is actually a JPEG. Take a look at imagecreatefromstring()
  4. There's a big button at the top that says download. And you can probably change the cursors with CSS.
  5. Here's one, works in most browsers http://xaprb.com/blog/2005/09/29/javascript-combo-box/
  6. It's called a combobox, if you check on Google there are some implementations of it in JavaScript.
  7. urlencode() changes spaces to plus signs. Use rawurlencode() if you want spaces to become %20.
  8. Because the first parameter to preg_match should be a string and you're giving it an array.
  9. [quote author=mgallforever link=topic=116102.msg472869#msg472869 date=1164331334]Use thorpes. [/quote] Out of curiosity, why that one?
  10. [code=php:0] if(ctype_alnum($username)) {   //valid } [/code]
  11. Or not...they will freeze your account if you do anything to the ads.
  12. Google doesn't like people messing with their AdSense codes, I wouldn't recommend trying to change anything in them.
  13. [code=php:0] print_r(glob('*', GLOB_ONLYDIR)); [/code]
  14. You can use the IMAP functions to fetch mail in PHP: http://us2.php.net/imap Or you can set up email piping on your server to have the emails sent to your script.
  15. $_GET and $_POST are only submitted to 1 page when the user submits a form.  Cookies are stored on the user's computer and any page on your site can access them. GET, POST, and Cookies are all stored in $_REQUEST.
  16. No, not unless you store them in a cookie.
  17. The values of $_REQUEST are sent by the user when they request the page.
  18. $_REQUEST contains $_GET, $_POST, and $_COOKIE.
  19. [quote author=toplay link=topic=114669.msg466886#msg466886 date=1163348289]Does anyone else have something to say directly relating to the correct order of checking these $_SERVER values?[/quote] That's what I'm saying, there simply is no correct order. All of the values can forged equally easily, it doesn't really matter what order you put the data in if it isn't trustworthy data to start with (a garbage in-garbage out kind of thing.)
  20. Sure, in that case I would just save all the info available  - print_r($_SERVER, true)
  21. For my script, I would assume $_SERVER['REMOTE_ADDR'] is the user's real address. It's the IP my server received the request from and it's the address I'm going to send my reply to.  I don't see any point in relying on data that is possibly forged.
  22. $_SERVER['REMOTE_ADDR'] -- it always tells you the IP address your server is communicating with. All the others can be faked/forged easily (the user can set them to whatever they want.)
×
×
  • 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.