Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Embeding/Including A Flash Movie That Uses Xml Files


I use a flash movie in a certain directory lets say: english/products/<prod_id>/gallery.swf

That movies uses the files: settings.xml, menu.xml, splash.jpg that are in the same directory as the flash, and /images/pics.xml and pictures in that directory and pictures in the /images/thumbs/ directory. I can embed the flash fine in a gallery.php file that is in the same directory as the swf file.

Here are the problems: When i try to include that gallery.php file in the /english/offer.php?id=x file the movie doesn't load

If i try to embed the movie in the offer.php the movie loads ok but can't find the files it needs to work correctly. I moved the files in the /english/ directory and the movie loaded ok so by embeding the movie in offer.php it makes the swf look for the files in /english/ directory instead of english/prod_id/

I can't hardcode it in the flash movie because its a user gallery and each user will have his own gallery and files. And i m not that good at flash so i dont know how to change the flash so it would use parameters from php.

Is there a way in php to include or embed the flash movie and force it to read the files from the correct directory?




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
PHP To Alter Flash Movie
I'm not sure if I've posted in the right place, so feel free to let me know if I haven't.

I've a situation where I would like to modify values in a flash.exe using PHP where flash.exe is a flash movie which is download and runs on the client side.

The reason for this is, I've an online form where I want the values to be submitted to an app for users to download. Each time the user runs the app on their machine it should have the values that they submitted online. Is this possible?

Compile Flash Movie On-fly By PHP
How i can compile flash movie on-fly by PHP ?

Displaying A Flash Movie To Browser
In a text field of a database I stored the flash code to display movies (swf). Depending on the user's request I send the code dynamically to the browser. It works great in a majority of platform and browsers except on Mac with IE 4.01

Is there any type of header() we need to send to the browswer before sending a flash movie ? It has nothing to do with the detection of Flash because I have a flash banner at the bottom of the page that works great. This one is static thought.

Getting The Size Of A Quicktime Movie Or Other Media Files
I'm writing a php based fileserver/ftp app and I need to be able to display quicktime (and eventually other media) files via the object/embed tags. I've got everything working except for the sizing. I'd like to avoid asking users to specify the size of the file upon upload, if possible. Also, making the size very large to fit anything inside causes major layout problems, so that is not an option.

So, I was wondering if anyone knew of a way to get this info from a file. Is there something analogous to getimagesize() for quicktime? I couldn't find anything in the manual.

I was also thinking of maybe using a graphics library to export a single frame of the movie as a jpg and then get the size of that. I haven't looked into this yet to see if this is possible. Are there any other ways to deal with this issue?

Calling Upon Movie Files By Class Id So The Path Can Be Hidden?
I am currently running mkportal, and have the media module installed. I would like to give the members of my site the opportunity to post all the files elsewhere, is there a way I can alter the php to call upon the files a different way such as classid? or maybe the number assigned for that page since its page is given a number, it just stores every thing in one folder on the server.

Including Files In Different Direcories That Include Files From Teirs
Okay, I made a simple AJAX shoutbox and I want to include it on all my pages. To insert the shoutbox I simply type <? include('/shoutbox/shoutbox.php');?> into my HTML page.

The problem is, that in /shoutbox/shoutbox.php I also include settings.php, functions.php, and some other files, and when I include /shoutbox/shoutbox.php into my index page, /shoutbox/shoutbox.php tries to call settings.php from the same folder that my index file is in, since I just 'included' it in index's source.

So my question is, is there any way, without using frames, to include a PHP file as it would be if you link directly to it in the address bar, but placed into another file in a different directory?

Including Files In Other Directories
I have some code running on windows on my local machine that uses the
jpgraph image library. I include the jpgraph libs using

include ("C:Programmingphpjpgraph-1.14srcjpgraph.php");

I am trying to get this code to run on my web host's unix server, with
no luck.
I put the folder (jpgraph) containing all the jpgraph libs in the same
directory as my php code. I have tried all of the following:

include ("/jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path)

include ("jpgraph/jpgraph-1.14/src/jpgraph.php"); //(relative
path without leading slash)

include ("/usr/www/users/mysite/jpgraph/jpgraph-1.14/src/jpgraph.php");
//(absolute path)

include("http://www.mysite.com/jpgraph/jpgraph1.14/src/jpgraph.php");
//(url)

include ("http://" . $_SERVER['HTTP_HOST']
. "/" . dirname($_SERVER['PHP_SELF'])
. "/" . "jpgraph/jpgraph-1.14/src/jpgraph.php");

None of these have worked. Does anyone know the proper technique to
include files in other directories when using Unix or Linux? Keeping
all php files in the same directory is not feasible.

Trouble Including Files
I am trying to include a file in a lot of my pages, but I am running into some problems.  I put an echo statement in the included file and that's showing up fine, but none of the variables are making the transition. Can someone enlighten me? I have no clue what could be going wrong.

Including Files In Remote Server
I have a perl script to grap headlines from slashdot and such for me, and I use corn to have it run hourly and put the headlines in a file on the linux server.

Now problem is that my site is sitting on a Windows 2000 Apache Server. So I can't seem to use include() to get the file into my page. Any suggestions or alternatives?

Including Files From Entire Directory
I have this little news script that stores each entry into a seperate file into monthandyear/day, month date, year hour-minutes-seconds AM/PM

so if it was Sunday, March 9, 2003 11:39 PM then the script would store the new entry in the folder named "March2003" and in a file called "Sunday, March 9, 2003 11-39-00 PM"

now, the problem i have is i want to have an archive of all my news entries by month, so how do i get the contents of all the march entries displayed onto one page in order of date and time?

Problem With Including Files In Windows
did all of the development originially on linux - everything works great. started moving it over to windows, i can't even get the main page to load. i have 2 files included on the index.php page:

1. ) config.php - houses db connection function & some sql functions
2. ) functions.php - has functions to display data based on what page you're on, etc.

the problem is i can't include the config file.

index.php times out after 30 or 60 seconds; without it, i have alot of code to fill in all over the application. i made some small changes to it, even tested it again on the linux box and it still works, however when i test it on the Windows machine it, as stated, times out. when i don't include config.php, the page loads alright, just with "call to undefined function: sql() in c:inetpubwwwroothtmlincfunctions.php on line 23" scattered where i have my db calls.

Require_once(), Seemingly Including Files More Then Once.
I don't know if anyone has run into similar problems, but it seems like
when I use `require_once(...)' with files that contain functions I get
an error indicating that it can't redeclare the functions. I thought
the point of the once directive was to PREVENT the system from
including duplicate files (and thus attempting to redeclare the
functions).

It has worked elsewhere, for instance I have a database.php file, that
just wraps the mysql database query functions into my own functions. I
have used it in the following manner in two files one that calls
another:
require_once "./directory/database.php";

And it works fine, it doesn't give me any errors about redeclaring
functions.

Now when I do the following in one file:
require_once "./directory/database.php";

and the following in the file the first calls
require_once $DOCUMENT_ROOT . "/directory/database.php";

I get the redeclare error. Is this because the system is perceiving
these as two seperate files? Syntax wise the above two work exactly
the same as if I had parantheses (I thought this might be the cause of
the error) but it wasn't.

Including Files That Have Query Strings
I am having trouble with accessing files with query strings. For
example the code "require 'template.php?102932'" gives the following
error:

Warning: main(/www/blog/template.php?102932): failed to open stream:
Invalid argument in C:wwwlog20041227est-of-2004index.php on
line 54

Fatal error: main(): Failed opening required
'/www/blog/template.php?102932' (include_path='.;c:php4pear') in
C:wwwlog20041227est-of-2004index.php on line 54

I have no idea what's going on. Is it impossible to open files with
query strings in PHP? I am running PHP 4.3.9 on Apache 2/Win.

Including .txt Files With Html Content
I have a php page and I want to include some txt files within it depending on the URL variable. For example, I have some text files (that contain html code) with these names:

cat.txt
dog.txt
parrot.txt

How can I make the contents of, say, "parrot.txt" appear on the page, if I use a URL like: mysite.com/page.php?c=parrot

"c" stands for "content" and each time I want to include a file, I would use the exact name of the txt file - but without the .txt extention.

I know this is possible and I had the code to do it but it's been over two years and I have misplaced the code.

Trouble Including Relative PHP Files From Cron Jobs
I have a php file /home/mysite.com/httpdocs/admin_section/report.php that as part of the script includes another file ../connections/connect.php.

Report.php works perfectly when I open it from a webbrowser (mysite.com/admin_section/admin.php), but when I run from my crontab or command line via:

# /usr/bin/php /home/mysite.com/httpdocs/admin_section/report.php

The report.php file then chokes on the include.

"PHP Warning: main(../connections/connect.php): failed to open stream: No such file or directory in..."

And the strange thing is this used to work before my server was upgraded by tech support. If I get rid of the relative path and include the full server path to connect.php, it works perfectly (but because I have a number of scripts like this, it isn't practical for me to change any of the PHP code).

Any ideas on how I can fix this?

Including Files With Images And Relative/absolute Addresses
I have an included file (header.php) that contanis a reference to a graphic.
If I stay at the root level, then I can control the relative path of the
image.
eg. images/imagename.jpg

However, if I include this file (header.php) in a lower level directory then
of course, I end up with no image displaying as the relative path is no
longer correct.

Currently I am using the following to provide an absolute path to the image.

$path = "http://".$_SERVER["HTTP_HOST"]."/images/";
$image = $path."imagename.jpg";
echo "<img src="$image">";

This works fine, but looks klunky.

I would like to avoid specifying an absolute hardcoded path name so I can
load this function on any site I choose.

how to get images displaying when including a
header.php file in a lower lever directory?

Return The Amount Of Files In A Folder (including Subfolders)
Are there any functions available in php that will count the amount of files in a folder + its subfolders and return the answer? I'm sure there must be a simple answer for this.

Strategies For Including Files When You're Not Allowed To Make Assumptions About Directory Names
1.) Can anyone think of a way to speed up this function? It is
terribly slow. I plan to reduce the number of directories to 3, which
I guess will speed it up in the end.

2.) This seems to be the brute force method, and I'm wondering if
anyone can think of a better strategy. I've been asked to make life
easy on graphic designers by not making assumptions about where I
might find the files that the software might need to run. The files
might be in the same directory as the main file, or in directories
above, or in ones below. The person may have remembered to put a
".php" at the end of the file name, or maybe not. Here I simply go
looking. Is there a more graceful strategy than this? Some kind of
regular expression thing maybe? ...

Auto-generate Thumbnails For Video/flash Files?
I'm wondering if there is a (good) way to auto-generate a thumbnails for video (.avi, .wmv, etc.) and flash (.swf) files and display them in a page.

Basically, i want to be able to list the files in a directory containing these file types, and have a thumbnail displayed for the file, w/o having to create thumbnails for the files manually (thus, making the site easily updated).

Is it possible? i do not have SQL installed on this server, and (as of now) the owner of said server has no plans on installing it. I'd complain, but he's hosting for free... soo... herein lies said problem.

Embeding Php Script In Perl
I have this program that runs and produces an error log file. When this error occurs, I want to use a command to call a perl or php script (I'm running linux and I have no trouble calling a script here). Then this script executes, parses the log file, and then stores this stuff in a mysql database.

So what I was going to do was have my program call a perl script which would do the text parsing, and then call a php script, sending in the data as an ARGV, and have the php do the database manipulation.

The reason I came up with this is I heard that php had some troulbe connecting to mySQL through command scripts like this. I figured might as well user Perl to get the data and then send to a php script that can run like in the server and update the database.

However after much thinking, I figure there has got to be an easier way. I'm new to using Perl/Linux/command prompts, so that is why I have the question. I'm also trying to avoid installing Perl modules, like the DBI/DBD:mySQL ones, because we are trying to use php to handle all of the database stuff.

Embeding Username And Password?
I have a live audio feed that I listen to off my friends website that is password and username protected. He gave me the user/pass and I asked him if I could post the link on my website so I can let others listen to the stream as well. He said that since its user/pass protected I would have to come up with a way to automatically username and password when the stream is started and he said if I can get it to work then he will let me use it.

I asked if he can just remove the user/pass but he said there are other people who abuse the stream and thus he wont remove it. So my question is, is there a way I can embed this live audio feed along with the username and password in a PHP script so when people go to listen they are not promoted for a user and pass?? I really have no idea where to start with this thus Im asking on here!

Embeding Images In HTML (thumbnails)
Hello, I've been working on this for a long time today and I'm not making any progress

I want to have a page that displays a thumbnail located in the database (thumbnail table) and when clicked opens a new page with the image in the original size, which is also located on the DB. The latter part works ok, the former (thumbnails) does not.

This is my code:

Passing Variable From Flash To Php & Back From Php To Flash
I am looking for some help in passing variable from flash to php & back from php to flash.

HOw To Combine Two .swf Movie Into One
Can anyone tell me how to combine two .swf movie into one using PHP.

How To Combine Two .swf Movie Into One
Can anyone tell me how to combine two .swf  movie into one using PHP.

Playing A Movie In Webpage
I want to play a movie in web page (php). Can any one help me? How can I do this?

Picture Of First Frame Of A Movie
Can any one let me know how can I capture or save the picture of the first frame of a video movie. Actually I want if some one uploads a video to my website then I also want to show the thumnail of that movie so want to show the image of the first frame of that movie....

Simple Movie System
i wanna try to make a movie system where i can upload my videos but i don't have to make a new page each time i make an new i would want the URL to look like video.php?id=1 does anyone know how to do that?

Problem With Movie File Upload
Hi everybody,

I want to upload movie files of quick time format.
Max file size is 4MB.

Default file size in php.ini file is 2MB.

i use the functions below:

ini_set("max_execution_time",&#55613;&#57176;');

ini_set("uploaded_max_filesize",&#394;M');

ini_set("post_max_size",&#395;M');

ini_set("memory_limit",&#396;M');


move_uploaded_file(srcFile,destFile)


in platform linux7.3 i can upload movie files with this script

but in linux 8.0 i can't.

it is possibly for the php.ini configuaration file that differs in linux7.3 and 8.0(php4.0)

Mpg Movie Stops Playing In Browser
I developed a web page that plays an mpg using the simple embed tag.
When the page loads, the video starts, but then stops after a few
seconds. I use the embed tag because I want the user's default player
to kick in. What might be causing the video to start then stop?

Create Image From Movie Frame
I'm design a new website based on PHP, I haveing a module to umpload images (jpg,gif) and upload movies (mpeg,wmv). To create thumbs from the uploading mages I'm using the GD to resize the original images. Now I want to create a thumbs for the movies too, in the past I used the convert command (ImageMagic) on my personal Linux machine, but the
option to execute command from the webserver is blocked due to security issue.

I find that ther is ffmpeg-php modules to do my task (create and image from movie frame) but my server's hosting company does not use it.

Is there any option in PHP / GD to do it?

Adding Intro/outro To A Movie? PHP FFMPEG FLVTOOL2?
we can use the simple FFMPEG conversion command from the command line to convert a video to FLV.

exec("ffmpeg -i meow.wmv -ar 22050 -f flv  output/meow.flv");

Now say I have two seperate videos, one called intro.flv and one called outro.flv

How would I add these to the begining and end of output/meow.flv. Also, I know using GD, or something alike, we can put text into a picture.... What about putting text into a video, on every frame. I'm looking for something simple.

Maybe this is already answered here, maybe I'll answer myself, but I'll get results and thats all that matters, get my scripts working the way they need to, and anyone else can use this to help them.

PHP Not Including In AIX V4.3, PHP 4.1.1
I am having a little problem using AIX v4.3, PHP 4.1.1 to include my include files. When I run the regular...

#including
How do I include a php file with arguments in a shtml file? It just gives me
an error. Can this be done?

Including Outlook
IN MS outlook we have a thing set up so people can sceaduale the use of rooms/equiment is there a way to access this information from an intranet page? or at least have something that would open the persons outlook up into that area of outlook. It's just everyone seems to find it to complicated to hit the clock button then find "#*$!x" in the menu. You can tell them over and over agaibn this is how you request for this piece of equipment but they just don't get it. Bad thing is they don't use it then come back an hour before they need it and expect it to be there and waiting for them regrdless of someone else needing it.

Including Pictures Via PHP
Is there any way of including a jpg or gif file through php without using the code below?

<?php
include("/images/$id.jpg");
?>

Including A Jpg Or Gif Image From Non Web Dir
I'm trying to include a picture from a directory that is not accessible via type-in in the browser. Is there a simple way to have it output a jpg/gif?

Including Functions
I am having a little trouble with including functions. Do I have to declear a function as global before I can include it in a script. PHP Code:

Including Html
I have recently started coding at a new position where I have a
designer that has templates setup. She has different html files that
do different things. Set the doctype, stylesheet, etc. These were
created for server side includes, and works great for html pages, butI
want to include these html files into all of my php pages, and am not
sure the best way to go about it.

I usually create functions for this, but then the designer has to
change the code in the html and the php. Also, in the html where there
is a " I have to change it to " if I use echo to print it out. Is
there a way that I can include the html in a specific location, not
change or copy the html again, or create a set of functions to include
the html and then when I call that function it?

Including A Script
I've installed a poll script which is in the dir /poll in my home dir. I did the installation and everything was smooth. There is a file called poll.php in the dir which when i run on my I.E i can see the poll i previously created in the admin area. The problem is , when i include that file in my main index page i get the following error :
PHP Code:

Including Html In Php
does anyone know the full code in which where you include a html page in your php page

e.g

index.php?id=main --->>> came from ---->> main.html

i think it was

<?php require("id$html");?> but it doesnt work ...

Trouble Including CGI With PHP.
I am in the process of switching my site over to PHP, and one of the things I will be altering is exchanging my current server-side includes for PHP includes.

I've managed to find PHP equivalents for most of my current includes, but I am struggling with the script (RatLog) that I use for counting creating my referral logs.

php include() doesn't seem to work on CGI, so I am having to use php virtual(). However, I can only get virtual() working with a path relative to root, not with the full path. But since I also plan to turn some sections into subdomains, my understanding is that relative to root will only work for the main domain, not the subdomains.

Can CGI be included using PHP in any other fashion? Is it perhaps a configuration issue with my host that is causing this problem? When I use php include() for regular files, they only work with full server path, not with a relative-to-root path. The version of PHP on the server is 4.3.7.

Includes Not Including..
The problem is with SSI and getting the part that says Scripture Today under the menu.
I have it including a file called func.php (attached) but it is not pulling from my server. I have changed directories and done everything I could think of but I still do not understand.

Functions Not Including
iv coded a simple php contact form, iv used a function to clean up the inputs , clean up all the characters and backslashes but when i do a test say : it's it comes out like it/s Code:

Including Array In SQL IN
I'm trying to use the SQL IN command when I query my mySQL database, but the value I am sending in it is an array, created when users selected multiple options in a list. I've been looking around and have seen a few possible solutions involving SQL, but I'm relatively new to PHP and SQL and am not quite sure how to resolve this. Any ideas?

matchTeam is the array:

$players = $_POST['matchTeam'];
$playerGames = "SELECT * FROM players WHERE playerID IN ($players)";
$playerGames_query = mysql_query($playerGames) or die(mysql_error());
$rsPlayerGames = mysql_fetch_assoc($playerGames_query);

Including A File
I am attempting to include a file, but it is not working so well.

Here is my direcoty structure.

Root
|-/file_man
   |-/functions
   |  |-/index
   |     |- top.x
   |-/files
      |-/users
        |-index.php


I am trying to call top.x from index.php using require, but it doesnt work like this

require("/file_man/functions/index/top.x");

any thoughs?

Including Function
I've written a function for copying and resizing a jpeg and subsequently used it on a page which has a standard dreamweaver script for inserting to a database (which uses a header redirect). If I paste the resize function directly on the page it works fine - but if I 'include' it I get the old headers already sent error.

I've solved the header errors using ob_start and ob_clean but this doesn't seem the ideal method. I was hoping that if I could understand why this error was happening in the first place I could find a way of avoiding the use of ob_start entirely. For whatever reason including the function causes it to send headers to the browser, but I don't understand why.

Here's the function: Code:

Including Problem
Warning: main(): Failed opening '' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/eternalt/public_html/index.php on line 158

I keep on getting that..

Including Forms
I am trying to keep the one main page with all of the static stuff, and simply have an if statement that includes different php files based on some condition.  This seems to work fine until i include a page with a form on it, at which point the for will not work.

I have tried every combination I can think of.  I have set the form action to the form page, and to main page.  i have put the start_session everywhere.  it doesn't seem to matter what i do the form will not work.

I am using an object, and am using a MySQL database (i have created a user object that can do things such as login or set password) and it does not seem to matter where i put the php for the form action, or the code for the database interaction, none of it seems to work through the include.

i'm sure i'm not the first person to try this.  I was just hoping someone could let me know the best way to do this, or if this is a bad way, what a better way is.


Copyright © 2005-08 www.BigResource.com, All rights reserved