Daniel0
Staff Alumni-
Posts
11,885 -
Joined
-
Last visited
Everything posted by Daniel0
-
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.
-
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.
-
for($i=0;$i<$num;$i++){ Where is $num set?
-
If you can you should.
-
You could compress the output: http://php.net/ob_gzhandler
-
Why not just use ORDER BY something (ASC|DESC) in the query?
-
It looks pretty good, except for the footer. It's too dark compared to the rest of the site.
-
How come you have a copyright in the future? How much did you pay? They screwed you...
-
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.
-
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.
-
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.
-
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.
-
I don't see the problem. Just open the file for writing instead and then use fputs() instead of fread().
-
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.
-
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; }
-
Eh... FTP? SCP?
-
What's the difference between the name attribute and indenting?
-
$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.
-
[SOLVED] Displaying XML List in php page
Daniel0 replied to jonahpup's topic in Other Programming Languages
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 -
He did resolve his problem, but just didn't click "solved".
-
You implied it with your code, but whatever.
-
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.
-
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.