Jump to content

Daniel0

Staff Alumni
  • Posts

    11,885
  • Joined

  • Last visited

Everything posted by Daniel0

  1. To check if it's Firefox you can just do if(stripos($_SERVER['HTTP_USER_AGENT'], 'firefox') === false) // it's important to use the identical operator { echo 'you are not using firefox'; } No need to match the entire user agent string.
  2. Daniel0

    Music

    You can't listen to it if it isn't downloaded to the your computer. You can compare it to not being able to read a book if it's in the building across the road. Streaming is just playing while downloading so you can start watching/listening right away instead of having to wait until it's completely downloaded.
  3. for($i=0;$i<$num;$i++){ Where is $num set?
  4. If you can you should.
  5. You could compress the output: http://php.net/ob_gzhandler
  6. Why not just use ORDER BY something (ASC|DESC) in the query?
  7. It looks pretty good, except for the footer. It's too dark compared to the rest of the site.
  8. How come you have a copyright in the future? How much did you pay? They screwed you...
  9. It's just blue. Also, what made you choose to reverse the reflection in the logo? Starting with low opacity going to a higher opacity.
  10. Is a no-no. You need to make it work for all the major browsers. Besides, I'm already using Firefox: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.9b2) Gecko/2007121120 Firefox/3.0b2 IMO it's too dark. Also, when I see a menu like yours I expect to be able to click anywhere on the "button" seeing as there are stripes going to the right, yet I have to move to the text itself to click it.
  11. Inside the first if you need to do $handle = fopen($filename, 'w'); fwrite($handle, $newdata); fclose($handle); Also, the fopen() you have in your code opens for writing, but you are attempting to read from it. If you use PHP5 you can use file_get_contents() and file_put_contents() instead.
  12. And I remember having answered a few as well. You just need to know HTML, <code> for code boxes and [PAGEBREAK] for page breaks. I'm not sure if regular users have permissions to add a tutorial though. I think you, Ron and Eric are the only people who can edit everybody's tutorials.
  13. I don't see the problem. Just open the file for writing instead and then use fputs() instead of fread().
  14. You could get the size of the image using getimagesize() and use the height and width HTML attributes on the img tag. You could also generate a new image with the new size dynamically at each request or you could one time generate a new image and store it on the server. It would be best to choose one of the two last options.
  15. It is because you haven't loaded the gd extension. Check php.ini
  16. Well, still (almost) the same $forced_width = 200; if($width != $forced_width) { $height *= $forced_width / $width; // just made it shorter, it's still doing the same $width = $forced_width; }
  17. Eh... FTP? SCP?
  18. What's the difference between the name attribute and indenting?
  19. $max_width = 200; if($width > $max_width) { $height = ($max_width / $width) * $height; $width = $max_width; } That will give you the new sizes for images which are too large.
  20. Try this: <?php function cmp($a, $b) { if($a['Qty'] == $b['Qty']) { return 0; } return ($a['Qty'] < $b['Qty']) ? -1 : 1; } usort($result['ArrayResult'], 'cmp'); ?>
  21. XML support sucks in PHP 4. I'd say get your host to upgrade or find a better host. If they haven't upgraded by now they aren't worth using IMO. Here is a list of hosts supporting PHP 5.2: http://gophp5.org/hosts
  22. He did resolve his problem, but just didn't click "solved".
  23. You implied it with your code, but whatever.
  24. I know I'm just being picky, but the fourth argument isn't a from argument but a header argument and what you do is that you are adding the From header.
  25. Ah, well... then: Before you output anything: ob_start(); After everything has been outputted: $html = ob_get_contents(); ob_end_clean(); Now the HTML source will be in $html.
×
×
  • 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.