|
#1
[
]
|
||||
|
||||
|
[Tech](php help)Random file .php troubles
Not sure if this is the greatest place to put this, as it isn't schoolwork-related, but whatever. I need some help. I'm using a random file .php for my signature, which works fine. However, I'm trying to get it to play random music when it is clicked on. It was working a day or so ago, but now I am prompted to download a file, which displays random gibberish (well, to me, anyways
). The code is as follows:Quote:
I don't really know any php, I just got this stuff from Yoshi 15. Maybe I should be asking him...well, whatever. I'm using the url "http://acious.50free.net/music.php", minus the quotes, of course. It was working fine before (opened up Windows Media Player, started playing song), but now it asks me to download an html file, which doesn't make sense to me, considering that it worked before. All the files are in the folder. |

|
#2
[
]
|
|||
|
|||
|
Re: [Tech](php help)Random file .php troubles
Sorry for replying a bit late.... I don't read this section often.
![]() What you're seeing or being made to download is the actual "code" of the image that you're supposed to be viewing. The reason you're seeing this is Yoshi 15's method basically takes the code of the image on the server, and throws it at your browser, assuming it'll sort everything else out on its own. Why do some browsers handle it properly, and some don't? Or different servers produce different results? Most of the time when files are sent to your web browser, they're sent with a header that tells your browser how it should handle the image. Using Yoshi 15's method, the wrong information is sent in this header. Again, some browsers and webservers will deal with it better than others. Try using the second method suggested by Mercutio, or the method I suggest, over in Signature Chit-Chat. How are these methods different? Instead of sending a raw image, they send just header code. This header code basically points your browser to another file somewhere on a webserver, which it downloads just as it would any other normal image, letting the server and browser handle the images the way they're used to. Sorry if I've provided a bit too much unnecessary information. Worth being educational, though. ![]()
__________________
dobs.org E3 News Feed |

| Sponsored Links |
|
#3
[
]
|
||||
|
||||
|
Re: [Tech](php help)Random file .php troubles
Erm...I don't know if youn interpreted that correctly. I'm talking about problems while playing the random songs, not the images themselves.
It seems that Windows Media Player can sort it out properly, though. Once I reinstalled it, it started working again. |

|
#4
[
]
|
|||
|
|||
|
Re: [Tech](php help)Random file .php troubles
Oh, well that works then.
![]() It applies for pretty much all cases where you're pointing something to a randomizer file on a webserver, that you should be using the alternate methods. It'll always ensure that your browser and whatever you're viewing with know exactly how to handle the content they receive.
__________________
dobs.org E3 News Feed |

| Sponsored Links |
|
#8
[
]
|
|||
|
|||
|
Re: [Tech](php help)Random file .php troubles
Yoshi's latest alteration should make things a lot happier.
![]() Currently I have 23 random signature images on rotation here at ZU. I have another 10 completed signature images that I use on various other forums, and roughly 30 half-complete signature images that I keep around either for use in my own signatures one day, or in case people start requesting. ![]()
__________________
dobs.org E3 News Feed |

| Sponsored Links |
|
#9
[
]
|
||||
|
||||
|
Re: [Tech](php help)Random file .php troubles
Wow, and I thought that my 15 were alot. I've been thinking about breaking from the continuous theme I have right now (same layout, etc.), but I'm not sure...the others wouldn't match if I were to do that. I think I'm going to add some more soon.
Bleh, this is getting kinda OT, so maybe we should quit it. ... Gah, couldn't help but ask: do you draw anything that is featured in your signatures? |

|
#10
[
]
|
|||
|
|||
|
Re: [Tech](php help)Random file .php troubles
Quote:
And with that, may this tangent meet its demise! ![]()
__________________
dobs.org E3 News Feed |

| Sponsored Links |
![]() |
| Tags |
| file, helprandom, php, techphp, troubles |
| Thread Tools | |
|
|