how to pull flash video from mysql with php - php

im trying to pull .swf files from MySQL by using PHP, ive set everything in the database up with an ID and licked it properly. Im not sure if the 'type' has to be anything special, right now its just a 'VARCHAR' and when altering the javascript part of it that that flash automatically generated-- in the i tried to echo it out by putting it in the value like
< param name="movie" value="<?php echo $row['video_path']; ?>" />
but thats not working

<object width="550" height="400">
<param name="movie" value="<?php echo $row['video_path']; ?>">
<embed src="<?php echo $row['video_path']; ?>" width="550" height="400">
</embed>
</object>
I hope this is what you are trying. You getting the video path from mysql ..

Related

hello, iam using mpdf to convert html to pdf, and the issue is showing a pdf inside the generated pdf

iam using mpdf to convert html to pdf, and the problem is showing a pdf inside the generated pdf
i am going to show what iam doing :
<div class="landscape">
Download PDF
<embed src="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" width="500" height="375">
<embed src="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" width="500" height="375">
<div id="pdf">
<object width="400" height="500" type="application/pdf" data="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" id="pdf_content">
<p>Insert your error message here, if the PDF cannot be displayed.</p>
</object>
</div>
<object data="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" type="application/pdf" width="300" height="200">
alt : test.pdf
</object>
</div>
i have tried embed , object and the pdf its not opening inside the generated pdf
any ideas ?
I would suggest running the HTML you are generating through a validator first to check for any syntax errors. Fixing these errors might sort out the problems. From looking at the code above it looks like you might have quite a few.

i am generating the pdf using mpdf from html and now i have to show pdf inside pdf

show pdf inside pdf
i am generating the pdf using mpdf from html, the problem that i am facing its that i have images and i can show them using img src, but i need to show the pdf inside the pdf
i have pdf files that i have to show inside the pdf file
with href the user can download the pdf inside the the report pdf file
any ideas?
this is the code i tried so far a nothing seems to work :
Download PDF
<embed src="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" width="500" height="375">
<embed src="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" width="500" height="375">
<div id="pdf">
<object width="400" height="500" type="application/pdf" data="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" id="pdf_content">
<p>Insert your error message here, if the PDF cannot be displayed.</p>
</object>
</div>
<object data="<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>" type="application/pdf" width="300" height="200"> alt : test.pdf
</object>
<iframe src="http://docs.google.com/gview?url=<?php echo base_url().'get_image.php?i='.$plan_dir.$plan['file'];?>&embedded=true" style="width:718px; height:700px;" frameborder="0"></iframe>
Try using URL with http, for example:
http://example.com/image.jpg or http://127.0.0.1/project/image.jpg
instead of base_url()...
To use the link, try using name
For example:
<a name="http://example.com" target="_blank">DESCRIPTION</a>

How to hide an URL/SRC from iframe?

Is there anyone that know a clever way to hide the src of an iframe?
<iframe src=
"<?php
$values = get_post_custom_values("my-custom-field");
echo $values[0];
?>"
width="100%"
height="500px"
frameborder="0">
</iframe>
As people have said in the comments, something which the browser requires cannot be hidden.
The only thing I can think of that comes close is using HTML Entities:
<iframe src=
"<?php
echo htmlentities($myurl);
?>"
width="100%"
height="500px"
frameborder="0">
</iframe>
Sorry but if there was a better way coded into actual browsers then it could be possible. This is probably the closest you're going to get though.

What is wrong with my PHP code?

I have been seriously been looking at this forever! I'm going out of my mind And can't figure out why my images are not displaying in my custom made footer.
I have firefox with firebug and it is simply saying that the url is failing to load. so I copy and pasted a url to an image that is currently working and is being shown via the background property in CSS just fine. (thats the top one that says dakota jones). copy and pasting the exact img src proves it still not to work.
my folder is images. My functions.php is right outside. the hierarchy is correct. what the heck?? The testing text in the p tags work just fine. uhuhuhu
Somebody help me! I'm using wp and genesis theme.
add_action('genesis_before_footer', 'include_sponsors');
function include_sponsors() { ?>
<div class="sponsors">
<p>This is testing text</p>
<img src="images/dakotajonesheader3.jpg" alt="Smiley face" height="42" width="42" />
<img src="images/tfobw.png" />
<img src="images/basskingbw.png" />
<img src="images/bighawgbw.png" />
<img src="images/kbw.png" />
<img src="images/mccoybw.png" />
<img src="images/nfcbwpng" />
<img src="images/rayjusbw.png" />
<img src="images/rrbw.png" />
</div>
<?php }
Use WordPress' inbuilt function:
<?php
bloginfo('template_directory'); ?>/images/dakotajonesheader3.jpg
?>
.. which will reference /wp-content/themes/your-theme/images/dakotajonesheader3.jpg
Wordpress dynamically rewrites URLs, so the URL you use to access a page is not the same as the path to the scripts that are running on the server. So you might request your page with example.com/Home. But your images are not stored in example.com/Home/images, which is where you're telling your browser to look. They're stored in example.com/wordpress/wp-content/themes/your_theme/images. So you have to give the absolute path to the images to the browser in your <img> tags.
Carson is correct, and you can use absolute paths to your images. Alternatively, if you want to avoid using absolute paths, you can call your images using bloginfo('template_directory');
For example:
<img src="<?php bloginfo('template_directory'); ?>/images/dakotajonesheader3.jpg" alt="Smiley face" height="42" width="42" />

How to create video player in php with play & fullscreen button?

I have got the below code from internet for embedding a video player but it doesn't have play/pause button or fullscreen option.
Here is the code:
<OBJECT ID="MediaPlayer" WIDTH=320 HEIGHT=342
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"
STANDBY="Loading Windows Media Player components..."
TYPE="application/x-oleobject">
<PARAM NAME="movie" VALUE="<?php echo $path.'/'.$_POST['file']; ?>">
<EMBED TYPE="application/x-mplayer2"
SRC="<?php echo $path.'/'.$_POST['file'];?>"
NAME="MediaPlayer"
WIDTH=320
HEIGHT=342>
</EMBED>
</OBJECT>
Any code fix please?
<OBJECT ID="MediaPlayer" WIDTH="300" HEIGHT="200" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">
<PARAM NAME="FileName" VALUE="<?php echo $path.'/'.$POST_['file']; ?>">
<EMBED TYPE="application/x-mplayer2" SRC="<?php echo $path.'/'.$POST_['file']; ?>" NAME="MediaPlayer" WIDTH="200" HEIGHT="200" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="0"></EMBED></OBJECT>
Better use some free flash based player and embed this on the website, this code you have pasted here - with windows media player - works very badly.
Beside it's very insecure. Easy to do cross site scripting if you don't filter _POST/_GET/
http://www.longtailvideo.com/players/jw-flv-player/
Users may need plugin to display media player in other browsers other than internet explorer. I recommend you to use a flash based player.
http://www.longtailvideo.com/players
{
<video width="720" height="430" autoplay *controls preload="none*">
<source src="" type="video/mp4">
<source src="" type="video/ogg">
//Your browser does not support the video tag.
</video>enter code here
}
add controls

Categories