Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
The sound is really poor.
-
Those translation tools cannot always interpret what's written correctly. Dibujo is for instance both 1st person singular (I draw) of the verb dibujar, but it can also mean a drawing (dibujo un dibujo = I draw a drawing). There are also several English words which have different meanings depending on the context which they appear in. You're better off finding somebody who speaks Spanish fluently. There are several translation companies, try to do a search on Google.
-
The fourth version of KDE, which is a desktop environment. It would probably have been faster to searched for it on Google than posting and waiting for a reply.
-
<?php $long = ip2long($ip); if($long == -1 || $long === false || long2ip($long) != $ip) { echo 'The IP is invalid'; } ?> Based of examples from: http://php.net/ip2long
-
Well, that's like writing regular text on paper. Imagine you have 50 paragraphs and after you wrote them you find that you would like to add another paragraph between number four and five.
-
If you have PHP 5 (which you should!) then you can also use the hash() function which supports more algorithms like sha256, sha512, ripemd256, etc. edit: fixed link
-
No they don't unless the web developer sucks. I hate "optimized for X browser" and "optimized for viewing at whatever screen resolution" BS.
-
I believe it's dedicated hosting where the company you lease the server from manages the server.
-
Code blocks are chunks of code contained within curly braces ( { } ). Example: if(something) { // here is a code block } while(something_else) { // another code block } The code inside the first code block is executed if something evaluates to true. The code within the second code block is executed as long as something_else evaluates to true. If the value never changes you'll have an infinite loop, i.e. the script will eventually time out and result in an error. Does the exact code I provided work or do you have problems with that?
-
[SOLVED] Help with SimpleXML->attributes()
Daniel0 replied to thomasgrant's topic in PHP Coding Help
SimpleXMLElement::xpath() always returns an array. You'll have to get the first item in the array. You can do it like this: list($node) = $doc->xpath("year[@name='2007']"); or $node = $doc->xpath("year[@name='2007']"); $node = $node[0]; Then you'll have an instance of SimpleXMLElement. Then you can do echo $node->content . If you wish the content node directly then you can use the following XPath query instead: year[@name='2007']/content -
Well, if you do while(something); then it will run for as long as something evaluates to true, but as you have no code block it won't do anything.
-
Yes. You can specify how it will work by passing either MYSQL_BOTH (default), MYSQL_ASSOC or MYSQL_NUM as the second argument. How about this? <?php $id = intval($_GET['manufacturer_id']); // i supposed it was an integer $prev = mysql_query("SELECT * FROM product_prev WHERE manufacturer_id={$id}"); if(mysql_num_rows($prev) > 0) { while($col = mysql_fetch_assoc($prev)) { echo "<a href=" . $col["url"] . "><img src=" . $col["image"] . " border=\"0\"></a>"; echo "<a href=" . $col["url"] . ">{$col['name']}</a>"; echo $col['desc']; } } else { echo "No rows with manufacturer ID {$id}"; } ?>
-
[SOLVED] Help with SimpleXML->attributes()
Daniel0 replied to thomasgrant's topic in PHP Coding Help
Try this: <?php $doc = new SimpleXMLElement('/path/to/file.xml', null, true); $node = $doc->xpath("year[@name='2007']"); ?> -
Use functions like preg_replace() or str_replace().
-
From the manual:
-
__get and __set public and private question
Daniel0 replied to el_mariachi's topic in PHP Coding Help
It is a private property and therefore it should not be able to be accessed from outside the class. If you want to access it from outside the class it should be defined as public. -
Overall I think it looks good. Definitely better than the old one. Here are some suggestions for improvement though: I'd probably move the "American Beauty Soldering Tools" type of header up next to the "VIDEO LIBRARY". The blue text in the bulleted text in the "New Product - Soldering Iron Maintenance Kits" box give me an idea that it's links, but they aren't so you might consider another color. The search box could use a bit more padding and it would look a nicer if the form controls had the same width. The non-breaking space before the labels in the search box should be removed too. On pages like this one where there is no #navcontainertop2 there is no space between the side bar and #navcontainertop. I don't know if that's just because the quote system isn't finished yet though. There is a really big gap on the bottom of the page (tested in FF3 and Opera). The container shadow stops suddenly after the footer - it looks a bit weird. I'm not sure what you can do about it though (other than making the page full height and move the copyright inside the footer. I didn't read what tibberous so I might have repeated something.
-
Probably. CAPTCHA works ok. It's not perfect, but it works. First of all there is the problem with blind people. Their screen readers cannot read the CAPTCHA image. Bots can read some CAPTCHAs using OCR (optical character recognition), which is the same technique used when scanning paper documents into digital documents. Unless the CAPTCHA is obscure enough you could create a program which will read your CAPTCHA image. If it's too obscure humans cannot read it either. You can deal with the blind people by having a service which reads the contents of the image aloud. reCAPTCHA offers an API which will generate CAPTCHAs and audio challenges for you. It's free to use. Another solution is to give the user a task to perform. It could be a math challenge for instance. Or it could be like showing nine pictures for instance, eight being dogs and the last one being a cat. The user must select the cat image in order to proceed - then of course you still have the problem with the blind people, but like CAPTCHA you could offer an alternative challenge for them.
-
YOUTUBE Stores 100 MILLION videos...how is this possible
Daniel0 replied to carefree's topic in Miscellaneous
Your personal internet connection is probably not fast enough to pose a problem for your ISP. -
Please tell me if you think Aplus.net has lied to me - register_globals
Daniel0 replied to Aldebaran's topic in Miscellaneous
hmm that would imply that the .htaccess file is being recognised, as far as i'm aware. getting a 500 internal server error would normally occur if you've not spelt something correctly in the file itself. instead of php_value, try php_flag: php_flag register_globals off If they're running the CGI version of PHP then those directives do not exist. That might be the case here. -
On elemental.php, run this query: UPDATE UserDetails SET Mothership = 1 WHERE ID = '{$user->ID}' For displaying the buttons: Just use a regular if statement.
-
What are these for? :-\ [attachment deleted by admin]
-
<?php function render_template($path) { ob_start(); eval('?>' . file_get_contents($path)); $data = ob_get_contents(); ob_end_clean(); return $data; } ?> Something like this? You can always add more advanced features.
-
Options -Indexes will not show the file list if you access the folder. I.e. http://example.com/folder will give a 403 Forbidden error but files can still be access, i.e. http://example.com/folder/file.ext will show. Deny From All will give a 403 Forbidden error on both file listings and files. So, if you want to hide the file listing but allow users to access the files use the former, if you wish to deny ALL access to all files use the latter. In order to use the former in a .htaccess file placed in the folder you wish the settings to have effect on AllowOverride Options must be set. For the latter AllowOverride Limit must be set. You can also set AllowOverride All which will enable all directives in .htaccess files. You can also put it in your httpd.conf file, but in order for this to work only on the folder you wish you use enclose it with <Location /path/to/folder> (path is relative to document root) and </Location>.