![]() |
Embed Youtube code in .htm
Ok so im working on this site... it all works well i have the add youtube script etc...
It uses highslide to view the video on site so the file where the youtube video inbeds i am using is .htm So i have made a script that allows the website owner to add his videos using a simple layout and it creates a .htm file in the spcified location using the episode number and .htm extension Anyway i have a text field form where he inserts the Episode name number and the youtube embed code and it all adds but i run in to an issue and now i am clueless Youtube embed code: HTML Code:
<object width="480" height="385"><param name="movie" value="http://www.youtube.com/v/nvNuc9isOeU&hl=en_GB&fs=1?color1=0x234900&color2=0x4e9e00"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/nvNuc9isOeU&hl=en_GB&fs=1?color1=0x234900&color2=0x4e9e00" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="480" height="385"></embed></object>PHP Code:
HTML Code:
<p><object width=\"480\" height=\"385\"><param name=\"movie\" value=\"http://www.youtube.com/v/nvNuc9isOeU&hl=en_GB&fs=1?color1=0x234900&color2=0x4e9e00\"></param><param name=\"allowFullScreen\" value=\"true\"></param><param name=\"allowscriptaccess\" value=\"always\"></param><embed src=\"http://www.youtube.com/v/nvNuc9isOeU&hl=en_GB&fs=1?color1=0x234900&color2=0x4e9e00\" type=\"application/x-shockwave-flash\" allowscriptaccess=\"always\" allowfullscreen=\"true\" width=\"480\" height=\"385\"></embed></object></p>Thanks |
Seems like the most likely cause is magic_quotes_gpc (thank gosh they finally decided to deprecate and get rid of this k to the rap). Check if you have it running either in your php.ini, via phpinfo(); or get_magic_quotes_runtime() (alternatively check gpc as well). If you do, turn it off, and never ever think about turning it back on (security is our responsibility and relying on the parser to do it for us is bad coding).
|
Well i did look in to this. 500 internal server error from a .htaccess so i looked in the mod_rewrite and as far as i know my server does not have this enabled. Dont have access to the .ini file unfortunatly is there no other alternative? or would i be better off contacting my host?
|
Who's your host? A lot of the shared hosts now-a-days offer directory based php.ini, though some of them don't advertise it. Try grabbing a copy for your version of PHP and putting it in your root folder. Run a file with a phpinfo() in it to see if the changes take effect.
Alternatively handle it within your script; php Code:
There are also two excellent examples of handling the entire group of superglobals posted in the first two comments at the bottom of http://us.php.net/manual/en/function...quotes-gpc.php of which I won't repost here so the original authors get credit where credit is due. :) |
| All times are GMT. The time now is 09:28 PM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0