jpg 2 swf converter

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
amitshetye
Forum Newbie
Posts: 12
Joined: Thu Dec 01, 2005 12:00 am

jpg 2 swf converter

Post by amitshetye »

hi all,

i'm using php-ming to convert the jpg to swf. i'm able to convert jpg to swf with that in this case my jpg file is on the local server.
But when i'm trying to convert jpg to swf which is on the web it is not showing me anything.

so what should i do for that??

my code is as follows

Code: Select all

<?php
 $m= new SWFMovie();
 $m->setDimension(53,54);
 $m->add(new SWFBitmap(fopen("http://movies.go.com/images/movies/n/newworld_2005.jpg","rb")));
 
 header('Content-type: application/x-shockwave-flash');
 $m->output();
 $result="&imgLoaded=true&";
 echo $result;
?>
anybody is having any idea??
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Post by onion2k »

I've answered this over at SitePoint.. in case you missed it there:

Code: Select all

<?php

$image = file_get_contents("http://movies.go.com/images/movies/n/newworld_2005.jpg");
$file = fopen("image.jpg","w");
fputs($file,$image);
fclose($file);

$m= new SWFMovie();
$m->setDimension(53,54);
$m->add(new SWFBitmap("image.jpg");

header('Content-type: application/x-shockwave-flash');
$m->output();
$result="&imgLoaded=true&";
echo $result;
?>
Post Reply