Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
No, it's just easier to read. You can do it like as, As, aS or AS. It's case insensitive. Edit: Oh, I'm sorry. I didn't notice. I'm not sure if you can do this though: from table1, table2 where
-
That's strange. It should round and not truncate. It might be a bug. I get the expected output when trying echo round(0.375, 2); (0.38).
-
[SOLVED] How can Get IP address and client computer name
Daniel0 replied to beboo002's topic in PHP Coding Help
The same way. When I access my localhost like http://daniel-laptop then $_SERVER['REMOTE_ADDR'] will contain 192.168.0.103 which is my LAN IP. -
I was just being lazy, you need to finish the query. The [...] signified something that I removed. Putting the rest in: SELECT table1.id AS table1_id, table2.id AS table2_id, field1, field2, field3 FROM table1, table2 WHERE field1=table2.id ORDER BY field3
-
In Firefox you would go to Tools > Options > Content and then uncheck "Enable Javascript".
-
Q1: Try this: http://www.phpfreaks.com/forums/index.php/topic,95433.0.html Q2: I would imagine that PayPal has some sort of API you can use to check who that have donated. Try to check out their developer central.
-
Try SELECT table1.id AS table1_id, table2.id AS table2_id [...] Then you can access it like table1_id and table2_id.
-
I would imagine it's some Javascript doing the redirection. Try to turn Javascript off and see if you are still redirected. If you don't then you just have to track down the Javascript.
-
Just create a links table storing all the link ids and their expiration time. Access it like that. E.g. <?php // connect to database here $result = mysql_query('SELECT * FROM links WHERE id='.intval($_GET['id']).' LIMIT 1'); if(mysql_num_rows($result) == 0) { die('Invalid image'); } $image_info = mysql_fetch_assoc($result); if($image_info['expire'] > time()) { die('Sorry, this image has expired'); } header("Content-type: {$result['mime']}"); readfile($result['path'); ?> Then access image id 8 like this: image.php?id=8.
-
YOUTUBE Stores 100 MILLION videos...how is this possible
Daniel0 replied to carefree's topic in Miscellaneous
I saw some video of a Youtube engineer talking about the backend of Youtube a while ago, but unfortunately I've been unable to find it again. Not that I understood most of it anyways... http://en.wikipedia.org/wiki/Sarcasm -
possible to create xml document from scratch with simpleXML ?
Daniel0 replied to dsaba's topic in PHP Coding Help
I think it is, but I'm not sure. You could try it out then you'll find the answer. -
http://www.phpfreaks.com/forums/index.php/topic,156753.0.html
-
Think Broke My Profile.
Daniel0 replied to beansandsausages's topic in PHPFreaks.com Website Feedback
Works fine for me. -
oldmanice being upset about being banned three times or something like that?
-
Put something like this in a .htaccess file: php_value upload_max_filesize *size_here* See: http://php.net/configuration.changes
-
If the action is empty, then it will submit to the current page. The action attribute cannot be empty or missing in XHTML 1.0 Strict though, I'm not sure about transitional. And just for making your code cleaner, you might want to do either "<form action='' method='POST' />" or '<form action="" method="POST" />' so you won't have to escape all those characters.
-
Try some of these things: http://www.google.com/support/webmasters/bin/answer.py?answer=35301 http://www.google.com/support/webmasters/bin/answer.py?answer=61062
-
The difference between programming "shortcuts" as you refer them to and the use if "u" and "ur" in sentences is that while the use of ternary operators and an exclamation point for negating a boolean value is commonly accepted as correct. The usage of "u", "ur" and whatever annoying abbreviations one might create are not commonly accepted as being correct or standard in the English language.
-
It annoys me when people say they are annoyed by people saying they are annoyed by people saying "ur" "u" Plus, it doesnt really make sense especially with programmers. Programmers are always looking for ways to do things quicker, faster, and simpler. Saying "ur" "u" is an excellent example of this for internet talking... Why the opposition? Don't tell me its not proper english, because I know you don't pronounce every word perfectly in speech conversation, because that's not proper english. That's the worst argument ever. Unless you type at something like 1 CPM the speed gain will be negligible. Besides, I don't know any programmers that would intentionally make errors. I would also consider correct pronunciation to be correct language usage and very important as well. I was once in a bus where a foreigner tried to ask me for directions but due to her poor pronunciation I wasn't able to understand most of what she said.
-
US English: Color UK English: Colour Spanish: Color Hmm... Beef because, err.. it tastes better. Framework or do it from scratch
-
Haven't used it, but you could try Authorize.Net's API.
-
HTML describes the content, CSS describes the presentation.
-
^[0-9]+$ and ^[a-zA-Z]+$ can do that, but why not just use functions like ctype_alpha() to determine if it only consists of alphabetic characters (a-z uppercase and lowercase) and ctype_digit() to determine if it only consists of digits (0-9) (is_numeric() won't work as it will accept floats as well)?
-
Try this: http://www.glump.net/dokuwiki/gpg/gpg_intro
-
Other VPSs cannot access your VPS, they run independently of each other. Are you sure it was a hacker and not some sort of bug? Was the table just truncated or dropped? They could have used SQL injection to do it through an insecure script.