PHP - Custom Background Image For Embedded Media Player
I want to place Custom background image for embedded media player
Can anyone help me? Similar Tutorialsthe below works in firefox but doesn't work in internet explorer is there something wrong with it <?php $file = $_GET["Watch"]; echo "<OBJECT ID='MediaPlayer' WIDTH='450' HEIGHT='310' CLASSID='clsid:6BF52A52-394A-11D3-B153-00C04F79FAA6' STANDBY='Loading Windows Media Player components...' TYPE='application/x-oleobject'> <PARAM NAME=".$file." VALUE='../audio/audio_files/".$file.".wmv'> <PARAM NAME='autostart' VALUE='false'> <PARAM NAME='ShowControls' VALUE='true'> <PARAM NAME='ShowStatusBar' VALUE='true'> <PARAM NAME='ShowDisplay' VALUE='false'> <EMBED TYPE='application/x-mplayer2' SRC='../dvds/dvd_files/".$file.".wmv' NAME=".$file." WIDTH='450' HEIGHT='310' ShowControls='1' ShowStatusBar='1' ShowDisplay='0' autostart='0'></EMBED> </OBJECT>"; ?> Hi I'm building a site that contains access to some mp3 files of people speaking English. I would like a media player that is able to handle a variable that results from a database search. I can use <a href etc> to link to the relevant file but would like to use a server-side player to stream the file, rather than the client's browser. Something like Dewplayer would be perfect but it seems only to take a static file (maybe I'm wrong there). The player appears within <object> tags, like this <code> echo '<object type="application/x-shockwave-flash" data="/player/dewplayer.swf" width="200" height="30" id="dewplayer" name="dewplayer">'; echo '<param name="movie" value="/player/dewplayer.swf" />'; echo '<param name="flashvars" value="mp3=file.mp3" />'; echo '<param name="wmode" value="transparent" />'; echo '</object>'; </code> (the code is freely downloadable so hope I'm not breaking any rules posting someone else's code here). Is there a way I can specify a variable in value? If not, does anyone know of a player that I can use that does allow that? Grateful for any help. Thanks in advance. Hi guys. My situation is the following... I want to be able to play videos on a website using a media player. I currently have the pathnames of the videos stored in a mysql database and the videos stored on my file system. I intend to use some PHP script in order to locate the video pathname in the database and then pass it to the media player where it will play the file. I was wondering how i go about this? as i am fairly new to PHP. The media player i am using can be found at: http://rainbow.arch.scriptmania.com/scripts/music/video.html Any help would be much appreciated Hello, I'm using this PHP code to generate a random number and display into PHP number, How could I add my own custom background for it with custom size: <?php // Set the content-type header('Content-Type: image/png'); srand ((double) microtime( )*1000000); $random_number = rand(0,1000000); // Create the image $im = imagecreatetruecolor(90, 30); // Create some colors $white = imagecolorallocate($im, 255, 255, 255); $grey = imagecolorallocate($im, 128, 128, 128); $black = imagecolorallocate($im, 0, 0, 0); $red = imagecolorallocate($im, 255, 0, 0); $blue = imagecolorallocate($im, 255, 0, 0); imagefilledrectangle($im, 0, 0, 399, 29, $white); // The text to draw $text = $random_number; // Replace path by your own font path $font = 'arial.ttf'; // Add some shadow to the text // Add the text imagettftext($im, 20, 0, 10, 20, $blue, $font, $text); // Using imagepng() results in clearer text compared with imagejpeg() imagepng($im); imagedestroy($im); ?> Would something like: $im = imagecreatefromgif ( "bg.gif" ); Work, I've tried that, nothing displays. Many thanks. i want to be able to extract a string from a variable when an IMG tag is present and then use the link of the image to create an image tag of it's own to be displayed let's say i have a string $post which contains the following... (ignoring the quotations) here is some random text ["IMG"]http://www.somedomain.com/someimage.jpg[/"IMG"] here is some more random text how would i be able to extract the string inside the [IMG] tags and replace it with a different string in the same position excluding the [IMG] tags such as <img src=''http://www.somedomain.com/someimage.jpg"/> any recommendations on how i would be able to do this? well.. i have vbulletin 4 forum i try to put video player so if i upload mp4 file so i can play video but sad part is its working only at firefox browser can you help me out .. video code looks like this
<vb:if condition="$attachment[attachmentextension] == mp4"> pls i really want that put to work in every browser sadly it works only in firefox somehow.. I need to be able to create an image from user input. I have found a couple of samples that purport to do that but when I copy the code I can't get it to work. I would appreciate advice as to what I am doing wrong please. One example I tried is from a tutorial on this site: http://www.phpfreaks.com/tutorial/php-add-text-to-image Now perhaps there is something I am doing wrong when I call on the image that is supposed to display but given that I have tried the same code with other images and it works I can't see what I am doing wrong, unless there is something in the nature of scripts that requires some extra steps. Here is my code to see the image (note that 'myscript.php' in my code is in the same folder as the code I am calling: <html> <head> <title>Using Images Created by Scripts</title> </head> <body> <h1>Generated Image Below ...</h1> <img src="myscript.php"/> </body> </html> Can anyone help? Thank you Hi, I'm new to PHP so sorry if it is difficult to understand my question. I've just added a new custom field for my website home page (home.php). I've image link inside that custom field and now I want to display that image at Home (Home.php ). Please let me know what code/loop should I add in home.php to get that image display with size of 100*50 px . I hope you understand what I meant to. Thank You. I'm sure it's not much, but I'm not understanding something with custom error handlers: I've created a custom error handler, which I initially set when my page loads : set_error_handler(array ( new ErrorHandler(), 'handleError' ));
It seems to catch all internal PHP errors, such as if I: var_dump($non_existing_var); right after the set_error_handler.... Now, I have an object that throws an exception after: set_error_handler(array ( new ErrorHandler(), 'handleError' )); $locale = new \CorbeauPerdu\i18n\Locale(...); // this should throw an exception ... I thought that with an error handler set, I could 'skip' the try/catch for it, but doing so, PHP spits out in its internal log: PHP Fatal error: Uncaught CorbeauPerdu\i18n\LocaleException: ....
My error handler doesn't catch it at all before, thus my page breaks!! If I want it to go through the error handler, I have to init my Locale with a try/catch and use trigger_error() like so: set_error_handler(array ( new ErrorHandler(), 'handleError' )); try { $locale = new \CorbeauPerdu\i18n\Locale(...); // this should throw an exception } catch(Exception $e) { trigger_error($e->getMessage(), E_USER_ERROR); } ... Is this normal ? I thought one of the goals of the error_handler was to catch anything that wasn't dealt with? Thanks for your answers! I have a page that displays various articles. I would like to show a background image for each article. Let's say I have articles for beaches. I would like to have a beach photo. Airplane article, show airplanes, etc. How can I accomplish this. This topic has been moved to HTML Help. http://www.phpfreaks.com/forums/index.php?topic=319094.0 This creates an image 1500x1500 pixels. But it creates it in black... how can i make it white. And i have to use imagecreatetruecolor() not imagecreate(). <?php $im = imagecreatetruecolor(1500,1500); // Output the image to the browser header('Content-type: image/jpg'); imagejpeg($im); imagedestroy($im); ?> Thanks! Hello
I am working on a site and the theme is a responsive theme but the header background is not resizing on mobile and tablets below is a link to the site
http://unitednews.sr/category/news/each category / page has a unique header , this is what I have in css for category news body.category-news #header-wrap { background: url( http://unitednews.sr/wp-content/uploads/2014/10/Header_UnitedNews.jpg); background-repeat:no-repeat; }Adding background size: cover does not work any idea ? Edited by crawling, 13 November 2014 - 11:47 AM. This topic has been moved to JavaScript Help. http://www.phpfreaks.com/forums/index.php?topic=331191.0 I was wondering if there is any way to let visitor chose image background of div and store it in session so every page have same background? I am using the following css
.content { min-height: 850px; color: #CCC; padding-right: 320px; background-image:url(../images/wheelie.png); background-repeat: no-repeat; background-position: right bottom; }however the background image only shows in the desktop version of safari, I have checked firefox and chrome and mobile safari. I can't see why. This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=355565.0 This topic has been moved to CSS Help. http://www.phpfreaks.com/forums/index.php?topic=349151.0 Well here is the original code in my script file, and it has a background color Green now: [/php]$article_content = "<center><table style='color: #FFFF31; background: Green; width: 400px; border: 1px solid #9BDDFF;'><tr><td><i><b><u>Welcome to Mysidia City's fishing pool</b></u></i><br><br><br> Before you actually begin your fishing career, I'd strongly recommend you to doublecheck if you have a fishing rod already since it is apparently required for every fisherman here. <br><br><br><a href='fishing.php?act=1'>Enter</a> the fishing pool now if you have a fishing rod already or <br>Visit this <a href='fishingquiz.php'>Page</a> to take the fishing quiz and earn yourself an old rod to begin with. <td></tr></table><br><center><img src='picuploads/other/lakeofrage.png'></center>";[/php] Now I wish to replace the background color with a background image, what should I do? The image url is provided below: http://www.pokemansion.net/picuploads/other/seadrabg.png |