brendandonhue
Members-
Posts
65 -
Joined
-
Last visited
Never
Everything posted by brendandonhue
-
UNIXTIMESTAMP - Is it always 10 Digit Long
brendandonhue replied to jimmy_B's topic in PHP Coding Help
You'll run into an integer overflow at the point. -
http://php.net/date
-
PHP's built-in GD functions don't support this. You can use ImageMagick, or a PHP class to write animated GIFs.
-
[SOLVED] imagecreatefrom[type]() detector help
brendandonhue replied to Kairu's topic in PHP Coding Help
Yes -
[SOLVED] imagecreatefrom[type]() detector help
brendandonhue replied to Kairu's topic in PHP Coding Help
A filename ending in ".jpg" doesn't guarantee the file is actually a JPEG. Take a look at imagecreatefromstring() -
There's a big button at the top that says download. And you can probably change the cursors with CSS.
-
Here's one, works in most browsers http://xaprb.com/blog/2005/09/29/javascript-combo-box/
-
It's called a combobox, if you check on Google there are some implementations of it in JavaScript.
-
urlencode() changes spaces to plus signs. Use rawurlencode() if you want spaces to become %20.
-
Because the first parameter to preg_match should be a string and you're giving it an array.
-
[quote author=mgallforever link=topic=116102.msg472869#msg472869 date=1164331334]Use thorpes. [/quote] Out of curiosity, why that one?
-
[code=php:0] if(ctype_alnum($username)) { //valid } [/code]
-
Or not...they will freeze your account if you do anything to the ads.
-
Google doesn't like people messing with their AdSense codes, I wouldn't recommend trying to change anything in them.
-
[code=php:0] print_r(glob('*', GLOB_ONLYDIR)); [/code]
-
get mail from mail server and process it.
brendandonhue replied to hanwei's topic in PHP Coding Help
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. -
how to check an file is a image ? plz help
brendandonhue replied to chandok's topic in PHP Coding Help
php.net/getimagesize -
$_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.
-
No, not unless you store them in a cookie.
-
The values of $_REQUEST are sent by the user when they request the page.
-
$_REQUEST contains $_GET, $_POST, and $_COOKIE.
-
IP address - So what's the latest way of obtaining (with PHP only)
brendandonhue replied to toplay's topic in PHP Coding Help
[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.) -
IP address - So what's the latest way of obtaining (with PHP only)
brendandonhue replied to toplay's topic in PHP Coding Help
Sure, in that case I would just save all the info available - print_r($_SERVER, true) -
IP address - So what's the latest way of obtaining (with PHP only)
brendandonhue replied to toplay's topic in PHP Coding Help
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. -
IP address - So what's the latest way of obtaining (with PHP only)
brendandonhue replied to toplay's topic in PHP Coding Help
$_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.)