External Random Flash Script
I want to write an external php script that would randomise flash files in a particular folder on my site and display one in a given space. I've already composed the script.
<?php
$location = "http://www.mysite.com/images/";
$files = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10");
$file = array_rand($files, 1)[0];
$ending = ".jpg";
$img = $location . $file . $ending;
echo "<img src="" . $img . "">";
?>
The problem is how to inset this into the flash movie tags. something like <embed src="flashmovie.swf"> where flashmovie.swf is the flashfile generated from the script above.
View Complete Forum Thread with Replies
Related Forum Messages:
External Random Flash(.swf) Display Script
I want to write an external php script that would randomise flash files in a particular folder on my site and display one in a given space. I've already composed the script. <?php $location = "http://www.mysite.com/images/"; $files = array("1", "2", "3", "4", "5", "6", "7", "8", "9", "10"); $file = array_rand($files, 1)[0]; $ending = ".jpg"; $img = $location . $file . $ending; echo "<img src="" . $img . "">"; ?> The problem is how to inset this into the flash movie tags. something like <embed src="flashmovie.swf"> where flashmovie.swf is the flashfile generated from the script above.
View Replies !
How To Open Random Flash Page Using Hyperlink?
I'm new to using PHP so please bear with me. I'm trying to create a hyperlink that will open a random Flash page so that users will see a different flash module each time. Here is some of the code that I wrote but I'm not sure if it'll work since I'm not very good at coding. Oh yeah, I'm not using a database either. // random_menu.html <head> <?php $i = rand(0,3); ?> </head> <body> <a href = "www.x.com/random.php?i=$i">x</a> </body> --------------------------- // random.php <head> <?php $i = $_post["i"]; if ($i = = 0){ $value = "a"; } else if ($i = = 1){ $value = "b"; } ...etc. </head> <body> <object> <param name="movie" value="$value"> <embed src="$value"></embed> </object> </body> Please help if you know how to do this.
View Replies !
Sessions? External Program / External Program
I am trying ac ouple of days now to learn some things on SESSIONS,but I think I am not getting it very clearly. I have a PHP page tha contains a form. Users enter data in the form, which are then written in a file (the file is created at the time a user enters some data) The file is then given as an input to an external program The external program runs and gives some results which are then stored in another file (that is created when the external program finishes) What I want to do is to somehow create these files and, when the user exits from the browser, then both files that refer to this user, will be deleted. Code:
View Replies !
External Url
I have tried to make a script, that checks the external url from a popup, but i just get permission denied in javascript. But can this be done in php?
View Replies !
External RSS
I am using PHP to parse some RSS feeds that appear on my home page. The problem is, if one of these feeds hosts is slow, it slows down my page load time. Is there a way to set a time out, so if that RSS feed isn't loaded within a certain it can be skipped.
View Replies !
Loading External Dll
I extract the php-4.0.4pl1-Win32 into my local PC C:php directory. I follow all the instruction in install file and find that the php script work. Then i go to uncomment the entension for external dll that needed in win.ini and also change the path extension_dir=C:phpextensions. the problem is each time i load the php script, it will prompt out the error message "unable to load dynamic library "c:extensionsphp_oracle.dll". can some one help me to resolve this problem?
View Replies !
External DOMEntity's
I have a question about PHP5's DOM, but I found the docs on this section are either incomplete or incorrect (e.g. wrong return types for several functions). How can external entities, or entities in general, be added to a DOMDocument? (I'm not asking about adding entity references because DOMDocument->createEntityReference works like a charm.) I should probably state the details around the problem: I am working on a templating engine that utilizes PHP5's DOM interface (http://xire.forizon.com for details) so for caching purposes if I can make the output document include cached versions of other templates via external entities (XInclude is already used, but not it isn't supported very well on the client side), then any client-side caching can also be utilized.
View Replies !
External PDF File
Is there a way for me to be able to fetch a PDF from another site and display it on my website without having to open up Adobe Reader? In other words, I would like to have this PDF document: http://flightaware.com/resources/airport/ASE/APD/AIRPORT+DIAGRAM/pdf to be displayed on a page when a user opens a page on my website.
View Replies !
Url In An External Php File
Situation: I have an external php file with a function in it that returns a value with document.write like this: <?php Header("content-type: application/x-javascript"); function myfunction() { return $something; } $some_variable=$something; echo "document.write("Some_Text: " . $some_variable . "")"; ?> When called remotely by javaScript, the php function behaves perfectly returning the desired variable: <script> type="text/javascript" src="http://www.mydomain.com/remote.php"></script> The Problem: I would like to display the "Some_text:" part with an active link as in <a href="http://www.yourdomain.com/">Some_text</a> So that when executed, the JavaScript displays the link with an anchor text. How can I write this code into the echo document.write function?
View Replies !
External JavaScript
I am using phpBB and wanted to display latest poll in phpBB to my home page. My home page is html extention and want to use java to call it and display it. I am stuck with these codes; php codes; <? php SOME, SOME.... { echo "document.write('$poll['options'][$i]['vote_option_text']');"; } ?> if ['options'] then will not print anything, if I remove ' ' then print something. However if I put all 4 items ('$poll['options'][$i]['vote_option_text']');"; without ' ' inside of [ ] it will print like; Array[0][vote_option_text]Array[1][vote_option_text]Array[2][vote_option_text]Array[3][vote_option_text]Array[4][vote_option_text]Array[5][vote_option_text] What is correct syntax?
View Replies !
Getting External Data
I am logged in to Yahoo with my Yahoo ID, and I visit: http://baseball.fantasysports.yahoo.com with my browser, it will tell me which Fantasy Baseball leagues I am in, and allow me to click on one to enter the league page. I figured therefore, that if I were already logged in, that the following code, would display the same page (i.e. I would be able to see which leagues I am in): $remotefile=fopen('http://baseball.fantasysports.yahoo.com/','r'); while (!feof ($remotefile)) { $line = fgets($remotefile); echo($line); } Unfortunately, the resulting page asks me to sign in, and doesn't display the desired leagues. But I AM still logged in to Yahoo. If I were to try to visit: http://baseball.fantasysports.yahoo.com again in my broswer, it knows I'm still logged in and displays my leagues.
View Replies !
External Program Via PHP
I need to execute a command-line program through PHP. I have a form which includes a textarea, where the user writes his data. These data will be used as input for the commend-line program. Will I go something like: $data = $_GET['info']; Which function shall I use? System, exec, shell_exec, passthru? I can't choose which one is the correct. By the way, the command which I use when I write the script in the command line is : program_name [argument1 -> A database file] [argument2 -> info supplied by user] So, in the function that will be used, the data supplied by the user will be passed as my second argument (the 1st argument is a file in my hard disk). And, lastly, do I need to change any global settings for PHP in order to perform such actions, ie running scripts via PHP programs?
View Replies !
External Banner
we are building a large agency website and are looking for a php code that a agency can copy to their website to display our banner so they get their free account, in our admin panel we want it to automatically check our code is on their site and as soon as it is removed it changes status. Maybe in admin it shows green button when it is on and when it is removed changes to red, as we have far to many to manually check daily.
View Replies !
External Programs
I have just installed my first Linux distribution (SUSE 10.0). Everything is compiled as far as Apache, Mysql & PHP is concerned. But, I have this problem: I call system commands through PHP using system, shell_exec etc The thing is that PHP responds OK when it comes to 'ls' or 'grep' or 'wget', but, in another program, not UNIX-native, there is no response. I am sure that the program is set up in the PATH, because, if I open a terminal, I can call it from everywhere and it works fine.
View Replies !
External Variables
It's probably not called an external variable... but this is what i need. I have a new design that uses a template... so it works like this: call up index.php (containing variables like content), this includes the template.php (includes the "backbone"). Now the template also calls up a few other pages (like the header, sides and bottom) but I need it to call up something else.. Code:
View Replies !
How To Run External Program
i would like to use php to run external program in window environment like open a macro program to let it run at window background. I try to use exec to run the window command, it works, but when i try to use exec to run other program, like this.. exec("run xxxx.ttl") // xxx.ttl is a macro the php will hang... anyone has sample on how to use php to run external program in window environment??
View Replies !
External Script
I have a script which reads a data file, reads the characters one by one and if a certain character is meet it does something else, at the moment it echos the fact that it meet a certain character. I need it to take the characters it has read up to that point and present them to a database field thats forms part of a set of fields that will be updated at once. Then it will continue to read the remainder of the file and repeat the process until it reaches eof. Is there something similar to goto or gosub, I did some checking and was laughed at, as you can probably tell I'm a newbie. Maybe I should be calling an external script.
View Replies !
Output As External XML
the following code runs a query on a database and outputs the results as XML within its self. I have attempted to get the php page to create a file called rss.xml but have failled. I have tried using $file= fopen("rss.xml" , "w"); but my knowlege of PHP wouldn't be the best or anyway near to the level of being able to modify the below page to do as i wish, would someone be able to take a peep at the page Code:
View Replies !
Flash, PHP & XML
Is anyone out there doing anything in terms of parsing in XML into Flash using PHP as a go between so to speak? I have done some stuff parsing XML directly into Flash but I ntoiced a huge speed hit. Anyways, I was wondering if anyone has done anything or has seen a way to parse XML into Flash via PHP.
View Replies !
Php/flash
I have a text field (multiline) in Flash. When I click "submit" it hits a PHP script. The PHP file sends the message in the text field to an email address. My problem is that when i receive the email, the message is joined together, not recognizing the line breaks that were made on the Flash end. Does the variable of the text field need to be manipulated before it gets posted to the php file?
View Replies !
PHP Flash
I am connecting PHP & Flash.. $var = $this->_nm->getVar(); <-- Get data from database $var1 = gettype($var); if (is_string($var1)) { echo "s=".$var1; } If i print in the browser, it will return s=string, however if i LoadVars in flash it will return s=NULL
View Replies !
Flash And PHP 4.3.1
I've been developing a project in Flash 5 that utilises both PHP and MySQL. The development and testing was done on a PHP server running version 4.1.2 (pretty old I know) and everything was working perfectly. However, upon upgrading to the latest version of PHP 4.3.1, it appears that my Flash application no longer communicates with the PHP files. Is there some new security measures that were introduced in PHP 4.3.1 that could be clashing with how the Flash file operates? Has anyone else experienced similar problems?
View Replies !
Php, Xml And Flash
i have a video with captioning. video is a flash file and captioning is in XML file they are working really fine. now what the problem is:: I am getting the path of xml file through php as well as video(flv) file path through php. the video works well but the xml file path which i got through php( from database) is not working. the captioning part (xml file) is not working now only the video is displayed... could anyone please help me to get out this situation..is the problem with php and xml or php,xml and flash.
View Replies !
PHP And Flash 8
This is a very weird problem having to do with security settings. I'm trying to access a php file, stored on a server on my computer, from a .swf file embedded in a webpage, but when it only works when you open the .swf file with flash 8. When you use the .swf file in a browser it comes up with this security thing and it wants you to change the security settings here: http://www.macromedia.com/support/d...manager04a.html Then I change it to always allow then I add 'local' and 'localhost' but nothing happens This database accessing work 100% when using the program flash 8. Code:
View Replies !
PHP With Flash
I know this is not a flash forum, but I have tried about 3 flash forum and no one either seems to know the answer or they will not help me one; so I thought I would give my regular visited PHP forum a swing at this one. I am trying to load images in Flash through PHP; but have no idea about action scripting. Has anyone every tried to do this; if so please advise me on how you accomplished this.
View Replies !
Flash
I dont really have a problem just enquiring, i have heard it is possible to do PHP in Macromedia Flash i was just wondering if anyone else knows about this because i have a college project and it needs to have PHP accessing databases, searching adding removing etc, and i really enjoy using Flash and i was wondering if it is possible
View Replies !
PHP & Flash
I am trying to send XML from flash to php so I can add it to the database. I am using the XMLconnector, from flash, and sending the results to a php file, however I have no idea how to call those parameters.
View Replies !
Flash...
I have a directory for SWF files, and each swf filename is stored in my database.. I want to retrieve the sun_button2.swf" from my database, and show it by passing the id from the url... Now The Flash Script is supossed to show something, but it doesnt. Code:
View Replies !
Flash Still
I've gone through a couple of tutorials from online and books and seem to be stuck and think it might be my setup. No matter what I do with php and action scripts my flash display is empty. So I dont konw if it's excecuting the backend stuff. I want a simple test that I can do which if I know doesnt work then my setup is wrong. Code:
View Replies !
XML V/s PHP V/s Flash
Browsers have come along way since 2000 and XML has a great deal of potential. But how does XML (along with XSL, XSLT, XSL-FO, XPath, XML-DOM, XQuery, XPointer and XLink (AJAX: Asynchronous JavaScript and XML,)) stack up against the use of just PHP / Javascript or Flash?
View Replies !
Flash To PHP
I've got a flash to php form on my site that works 100% of the time... for me. Unfortunately, I keep receiving undefined emails through it. Since it works for me I don't know why it wouldn't work for someone else. Code:
View Replies !
PHP And Flash Together
if PHP can be combined with Flash to the effect that Flash manages all of the user interface, and PHP is allowed to handle any dynamic content referenced from a database?
View Replies !
With Flash
I need to draw a map for the customers to select the seats they preferred. Im thinking og using flash to draw the map and then post the data to php. Is this works?
View Replies !
Flash SWF
I have a main flash movie that loads another swf on another level with in my main movie and within the loaded swf I have a button that I want to go to a scene in my main movie. How can a acomplish this? Example: Main site loads up then on the time line and action calls for another swf to load on level 2 with in my main movie because of its size. With in my loaded swf I have a button that I want to go to my main movie and get another scene.
View Replies !
PHP And Flash
Is it possible to write a php script that will play the flash swf and then replace it with a jpg? That way if users don't have flash they will still see the graphic after the movie is done playing.
View Replies !
Flash?
I have a page written with php and a MySQL Database. Now, I want to redesign the whole, but still with the Database and php. is it possible to design the page with Flash and then to put all the php commands into the source code? specially, I still need the extension *.php?
View Replies !
How To Make Sure External URL Is Reachable?
Is there any simple method in php to determine if a url from a website is reachable? This is so that if your website has to load content from another URL, is there a failsafe method for the other parts of your website to load even if that one part is down?
View Replies !
XML Form Post To External URL
I'm far enough along in PHP to know how to create input forms, grab the form input as $_POST variables, do some basic validation checks and present the errors to the user for resubmit if needed. For the life of me I can't understand why I can't post data as an XML document to one of my advertisers. For example, a lead form is complete with Name, Address, Phone, and so on. I capture the form data and submit as an XML document. This particular advertiser will only accept data as an "External XML Post." I tried using Javascript and PHP with cURL, but I'm going in circles trying snippets of other people's code -- it's been a week. At this point all I want to do is assume IE7 (nothing else!) and no data checks, just "here's the XML, here's the external URL" and show me that HTTP POST actually works. Right now I'm thinking it's a bunch of junk :-) Someone please help. Here's my server info: PHP Verion 4.4.4 Apache/2.0.46 (Red Hat) CURL support enabled CURL Information libcurl/7.15.4 DOM/XML enabled DOM/XML API Version 20020815 libxml Version 20510 HTML Support enabled XPath Support enabled XPointer Support enabled XML Support active XML Namespace Support active Here's a sample of XML, let's call it "data.xml" <?xml version="1.0" encoding="UTF-8"?> <DataFormSubmit> <individual id="12345"> <FirstName></FirstName> <LastName></LastName> <Address></Address> <Phone></Phone> </individual> </DataFormSubmit> POST XML document to URL on an external website for example: http://www.example.com/othersite/xml.aspx Response XML is equally simple. There is no mention of MethodCall, MethodResponse and Params like the books say, so please don't use those elements in your reply to me. There is mention of field requirements like "Text field" "255 character max" "Numeric" but I think this can be handled by the input validation scripts. I'm just trying to POST and get a response. I've received errors refering to "permission denied" "access denied" "object expected" but at this point I've edited my code so many times I don't know what's right or wrong any more. Here's one of my failed cURL examples: <?php // XML data as string $request = '<?xml version="1.0" encoding="UTF-8"?>' $request .= '<DataFormSubmit>' $request .= '<individual id="12345">' $request .= '<FirstName></FirstName>' $request .= '<LastName></LastName>' $request .= '<Address></Address>' $request .= '<Phone></Phone>' $request .= '</individual>' $request .= '</DataFormSubmit>' // Create Headers $header[] = "Host: www.example.com"; $header[] = "Content-type: text/xml"; $header[] = "Content-length: ".strlen($request) . " "; $header[] = $request; // Send using CURL $ch = curl_init(); curl_setopt( $ch, CURLOPT_URL, "http://www.example.com/othersite/xml.aspx"); // URL to post curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 ); // return into a variable curl_setopt( $ch, CURLOPT_HTTPHEADER, $header ); // headers from above curl_setopt( $ch, CURLOPT_CUSTOMREQUEST, 'POST' ); // special POST with specified Content-type $result = curl_exec( $ch ); // runs the post curl_close($ch); echo $result; // echo reply response ?> And I tried a Javascript variations using code like xmlhttp = new ActiveXObject("Microsoft.XMLHTTP") but I'll save that for a followup post since this is getting long. Anyone out there doing external XML form post?
View Replies !
Is There A Way To Interact With External Webpages
I don't know if this can be done using php (I'm hoping). I need to automate passing a variable from a text file to an external webapge (that is not mine). Basically, simulate a user entering a number into a textbox and then activate the submit button. The webpage in question has a textbox named 'serial_number' and a button named 'submit'. I would like to pass a numeric value to the serial_number textbox and then activate the submit button. Can this be done uisng php? If not, does anyone know of any method to do this?
View Replies !
Formating External Text
I have a quick question about the formatting of external text files. I am trying to make a webpage for a local church that will display what is on in the coming weeks. I have done this using an external text file so that the future users will never have to modifiy the page itself. If left as plain text, it shows on the page in default format. I know I can format the text within the text file using standard HTML, but is there a way of formatting regular text outside of the text file? Kind of post processing it? The file format will always be something like Monday 19th 09:00 Add event here 12:00 Add event here Tuesday 20th 09:00 Add event here 10:00 Add event here 13:00 Add event here etc... The number of events on each day is variable, and not every day may feature (could be monday events then thursday events). I would like to make the Day and date bold, the times italic...well you get the idea! I have an idea that I will need to impose a structure on the file, however I am unsure of how to do this. If this is the case, then I would appreciate it if someone could post a link to a decent tutorial or guide so I can learn it!
View Replies !
Read External Webpage
I made the folowing script. It works in most cases but not in the one below. I tried several solutions, but I still don't get the content of that website. <?php $url="http://www.example.nl/"; aspxerrorpath=/Default.aspx"; $arr =file_get_contents($url); print($arr); readfile($url); $array = file($url); print count($array); ?> Who can help?
View Replies !
Calling External File
I am fairly new to PHP programming, and I'm trying to get my head around this one... I have a form that I am doing validation on via PHP within the same page, so if there is an error, a message will show to the user above the form. If all goes well, I would like to call a processing script that I have already set up and working to format the users response and send it out to a specified e-mail... I'll call it processing.php Is there a way that I can, if the form is filled out correctly, make a call to processing.php, that will totally leave the control of form.php and do it's processing?
View Replies !
|