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 Complete Forum Thread with Replies
Related Forum Messages:
Set The HTTPS Username And Password Using Php/flash And Then Open The Secure Page.
My hosts allow secure https logins on specific directories. What I want to do is have a login screen in flash, if the user enters the correct username and password I would like to set the HTTPS username and password using php/flash and then open the secure page. In my mind at this point they'll be logged in and then can navigate the secure page without seeing the browsers https login dialog. Am I kidding myself, or is this possible? They're config is the following: PHP Version 4.3.11 4.9-STABLE FreeBSD Zend Engine v1.3.0 Apache/1.3.33 (Unix) PHP/4.3.11 mod_ssl/2.8.22 OpenSSL/0.9.7c FrontPage/5.0.2.2635 mod_throttle/3.1.2
View Replies !
Add A Hyperlink To Flash
I would like to know how to go about adding a link to a flash banner (swf file) that will users to another website. The flash banners are owned by me. I have would like to do it in php code not javascript or actionscript. Also is there a way to add a hyperlink by editing the swf file and resaving it?
View Replies !
Is It Possible To Add Hyperlink To Flash Mp3 Player
is it possible to add a hyperlink to flash mp3 player? I not referring to embe link inside flash mp3 player, click <a href= link <script type="text/javascript"> var s2 = new SWFObject("mp3player.swf", "playlist", "240", "135", "7"); s2.addVariable("file","playlist.mp3"); s2.addVariable("backcolor","0x00000"); s2.addVariable("frontcolor","0xEECCDD"); s2.addVariable("lightcolor","0xCC0066"); s2.addVariable("displayheight","0"); s2.write("player2"); </script>
View Replies !
Open A Picture In Flash
I'm building a photo database with php and mysql. After a search the result is displayed with thumbnails. When I click on a thumbnail the picture gets bigger. I need a way to protect the large pictures from beeing downloaded. One idea I have is to use flash to show the large picture. But how do I do that from php? Or is there better ways to protect the pictures?
View Replies !
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 Replies !
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 !
Random Window.open
I would like to know if there is a way in php to randomize the following url (www.domainsample.com used as example). I have 4 different urls I would like to use, basically changing every time the page is accessed. <!-- function open_on_entrance(url,name) { new_window = window.open('www.domainsample.com','domainsample', 'menubar,resizable,scrollbars,dependent,status') } // --> </script>
View Replies !
HTML Web Page Hyperlink To Php Web Page
I am still having a problem parsing a html page with php. Code in my HTML is <? php echo '<a href="index.php">Home</a><br /> <a href="login.php">Login</a><br /> ' ?> However the link is to the Login page is: file:///C:/Program%20Files/Apache%20Group/Apache2/htdocs/TeeJayUu/login.php I am using PHP 5.0.2, Apache 2.0.52, MySQL 4.0.21, and Windows XP SP2. All pages are in the htdocs folder and the following instructions have been followed: - Copy php5apache2.dll to Apache's module dir and rename it to mod_php5.so; - Copy php5ts.dll to Apache's bin dir. Finally, add the following line to your httpd.conf file: LoadModule php5_module modules/mod_php5.so Apache has been stopped and restarted. Help - I am lost for what else to do. I want to keep this local until I have got it working.
View Replies !
Hyperlink And Posting To New Page!
I have a page where I have done a successful query and get search results displayed. Now I would like a link activated so that they can click on the name and go to new page with further details about that company like address hours etc.
View Replies !
Identifying A Page Via Hyperlink
I have a page (product_wide.php) that displays sale items. In that page, I "include" a 2nd page that contains hyperlinks to general item categories. The hyperlinks in filternavbar point to product_wide, and display items from the category selected. I need a way, using the same hyperlinks I am using now in filternavbar, to tell, from product_wide, that it was from filternavbar that the link was clicked (as opposed to some other page in the site that takes you to product_wide. I can't change the configuration of the filternavbar url because of duplicate content issues with google.
View Replies !
Hyperlink From Intranet Web Page To Local Files On My Computer
I'm creating a company intranet, and every employee has certain program we want them to be able to run from it, meaning we want the link to the program to be on the intranet page. For example, Adobe Photoshop resides on all the employees computer under "C:Program FilesAdobePhotoshop 7.0Photoshop.exe" However, when I enter that as a hyperlink on the page, it does not run the program. Is there a way to get a web page to run a program on the local host?
View Replies !
Script To Open A Small Page When Loading A Large Page?
the idea is a script that loads when a large page is trying to open that need for example 5-6 mins to load and in the mean time to open a very small page that is saying loading the page please wait and when the large page is loaded to go directly to that page. Do u get my idea?
View Replies !
Flash Not Working On Page
I have inserted Flash animation on my page as normal (using Dreamweaver)- only it won't display in the browser for this site - which has various php/mysql pages on it - but this one is a simple html page - which displays the html - but not the Flash ? The flash displays in the browser if I insert it into a page on another site - which does not use php/mysql. Is it to do with the set up of the site which uses php/mysql ? - e.g. the fact there's testing server settings. My sites/servers are hosted remotely - and not on my own machines.
View Replies !
Flash .swf Doesn't Show In PHP Page
I've recently put together a flash navigation for a 4 page site... three pages are HTML, the index page is PHP with a weblog. In all current Mac browsers, all four pages load fine. In Win IE 6 only the .shtml pages will load the flash--the .php page shows a big white box instead. If I include the index.php in the index.shtml file, the flash loads fine, but I'd like to know if there is some issue with PHP & flash that I should look out for... or is the issue with IE 6.
View Replies !
Compose MP3 From A Php Enabled Flash Page.
I have an educational web site. I want to create an interface where my students can record their voices client side and then save messages server side. I thought Odeo would solve my problems. (The have their own problems now.) Then I tried: MyChingo and Mobasoft. Come on $6,000 for a site licence....
View Replies !
Image Upload - Using A Variable Passed From A Flash Page
i'd like to pass a variable using post into the following form (that is from php.net) using a variable passed from a flash page (i'm competent in flash but a novice in php)how do integrate: $folder = $_POST['folder']."/"; into the form so that when submit occurs the folder path is passed to upload.php : <!-- The data encoding type, enctype, MUST be specified as below --> <form enctype="multipart/form-data" action="upload.php" method="POST"> <!-- MAX_FILE_SIZE must precede the file input field --> <input type="hidden" name="MAX_FILE_SIZE" value="30000" /> <!-- Name of input element determines name in $_FILES array --> Send this file: <input name="userfile" type="file" /> <input type="submit" value="Send File" /> </form>
View Replies !
How To Open Page
I want to send the browser to a differnet page how do i do this with php? it's an if statment if true send to example1.com else send to example2.com.
View Replies !
Open A New Page?
I have a small problem, this is my current script: {$_SESSION['login'] = $_POST['login']; $login='You are now logged in <b>' . $_SESSION['login'];} else{ $login= 'Wrong user name or password.';} If the user name or password is incorrect, it will just display Wrong user name or password. But what I want it to do is have the browser open a new page if it is incorrect, for example incorrect.php. Which will then display an incorrect user name or password message. This shouldn't be too complicated, I just have no idea how to go about it.
View Replies !
On If Statement Open .htm Page?
how to open a preset page from an if statement, such as: if ($row["password"]==$password ) { printf("Successfully Logged In!"); }else{ print("Login failed!");} where instead of just printing the text string it opens a new page!!
View Replies !
IE Ask To Open The (php) Page As File
I just uploaded a new website onto a new server. On this server however, when you click on the only 2 php pages. IE will ask to open the page as file. Is there a simple way to fix this, or is it simply the new server that can't support php? The two pages are just a simple email form.
View Replies !
Open A Page In Grayscale On Mac...
I've having a serious issue that I need your help with as soon as humanly possible. I have a page that has some products on it, when the product is clicked, it opens up the printable version along with the print dialog box for printing. My problem is, I need the page to open up in grayscale. It's working in IE, but it's not working in Fire Fox, and it's not working on Mac.
View Replies !
Orig. Page Open
Usually when I use header it just replaces the current page, but now with this code it opens a new tab in firefox and puts in the page there, leaving the original page in the original tab. What can be the cause of that? code: if ($_REQUEST['returnitems']) { header("Location: http://" . getenv(HTTP_HOST) . "/index.php?section=admin&action=returns"); }
View Replies !
Open Page In Frame
i would like to open a page always inside a frame. This can be achiieved with a simple javascript <SCRIPT LANGUAGE="JavaScript"> <!-- if (self == top) { location.replace("index.htm"); } // --> </SCRIPT> However this can cause a popup depending on the user's browser settings
View Replies !
Open Feedback Page
i am trying to open feedback page after a user visiting a particular site( that means when a particular user close all pages after see the ste and at last i want to open the feed back page).
View Replies !
Random Page Generator
I am on this site, and it is supposed to randomly display pages. There are about 150 pages in a bank that this site will choose from, but for some reason, the same sites keep coming up over and over again. When i view the page source, it shows an ID for each page. Is there any way i can view a certain page that i want every time if i have that ID?
View Replies !
Random Page Load
I have a page setup with an iframe. What I am trying to do is to load one of 3 features in the iframe. The iframe is: Code: <iframe src="featured1.html" name="player" id="player" scrolling="no" frameborder="0" height="316" width="490"></iframe> I'd like it to load either: featured1.html featured2.html featured3.html
View Replies !
Open And Process Remote Page
I want to be able to ask users for a URL, open that page, change some of the contents and then display that page as if they had typed the URL into a browser. I have toyed with some of the php functions for opening URLs, but what I am not clear on is how much work my script will have to do (do I need to fully emulate a browser, for example). The net effect I am after is very similar to the page translation feature that Google offers. Does anyone have any examples of this kind of technique. Any ideas how much work is involved? (My 'translation' is pretty trivial, so really it is mostly a question of how much work to display the remote page).
View Replies !
Open Link In Included Page
How to include Link that could open in same page rather than going to another page for example, if i include a file in home.php <? include("/index.php") ?> and I want to open up the LINKS in "index.php" in same home.php. example - open "/index.php?p=Hits" on same home.php page I know i could have FRAMES but i dont want to frames in my site
View Replies !
How To Get Rec Id And Use Header() To Open New Page And Pass Rec Id
1. After the record is inserted I would like to open page_add.php and pass the record id (there is an auto_increment field in the table called ID) to the new page "page_add.php". I was thinking of using header() to open the new page and passing the id as parameter (i.e. page_add.php?rec_id=what ever) is there a better way to do this? 2. how would I get the record id after I store the new record? 3. Also not sure how to write header() with a variable in it? Code:
View Replies !
Random Products On A Page - Like Ads In An Ad Server
We have a table of products that we'd like to show on our content pages. Like ads in an ad server, we want the products to show randomly throughout specific pages. The logic might be something like: For each page select all the products that match that topic from this list of products, randomly choose 4 products for each content page My product table has the following columns: - productSKU (primary key - unique value - text) - mytopic (the topic where the product should appear) - probability_to_appear ( a product with a probability of 2 should show 2x as much as a product with a probability of 1) My question is - how can I randomly choose 4 products to appear on each individual page? I know that an ad server can serve weighted random ads. Does anyone know how I could use PHP code to serve weighted random products?
View Replies !
Random Page Generator - Readdir()?
I'm trying to find/write a script that, when clicked, will open a randomly selected HTML file in a directory (and within its subdirectories). It would not need to attempt to exclude other file types, as it is exclusively HTML. There are too many new pages for me to individually archive a set list, as some places have suggested. My research has told me that a readdir() method could solve this problem, but i dont know what to do with it Code:
View Replies !
Random Landing Page Generator
All I want to do is to have a small PHP script on a page that when the page is landed on it shows the information selected randomly from a list of URLs. (I'm trying out different website layouts and landing pages) Every script I've found on the web comes with about 10 different files (one even needed a database?!?!) when all I'm really looking for is: <?php $file = file_get_contents_randomly ('http://www.example.com/page1.html'); ('http://www.example2.com/page.html'); ('http://www.example.com/page113.php'); ('http://www.example4.com'); Echo $file; ?> obviously file_get_contents_randomly doesn't exist but I would have thought there would be something similar. The 10 pages of coding seems very dramatic and generally tries to account for all ancient browser types and IP addresses etc. etc.
View Replies !
Text File To Popup Or Open In A New Page
I have a form which takes user input. On submit, the form will run a php script that will create a new text file using the user input. I want this text file to popup or open in a new page. The problem is that when the page opens it still shows the old text file, i need to hit refresh for it to show the last user input. the html file (greatly simplified): <html><head> <title>Untitled</title> </head> <body> <form action="action.php" method="post"> <p>Title: <input type="text" name="Title" /></p> <p><input type="submit" /></p> </form> </body> </html> The php file (simplified as well): <?php $spot_code = $_POST['Title']; // Open the file and erase the contents if any $fp = fopen("myfile.3dml", "w"); fwrite($fp, "<TITLE NAME=" . '"'. $spot_code .'"'. " /> "); fclose($fp); //redirect header( 'Location: http://localhost/mytest/myfile.html' ); ?> the text file, myfile.3dml is embedded in myfile.html (it requires a plugin to view - it's a 3D world). When myfile.html is opened it displays myfile.3dml but it needs to be refreshed to show the current input.
View Replies !
Random Link Form Current Page
I have huge page of links, to whcih I am currently adding. I would like to add a "random link" button which would parse the current page, extract all URLs then load a random link.
View Replies !
Page Still Caches Even With Header() And Random Query String - HELP
I created a page that will be doing image resizing and manipulation, which seems to work (using GD library). However, upon returning to the page where the image has been changed, I still see the old image, until I refresh my browser and then zappo, there it is! All changed! I have done everything I can think of to force caching including this: Code: ( php )
View Replies !
Open Popup Window When Page Is Loaded If A Field Is Populated
Would it be possible to open a popup window on loading the instruction page but only when the critical information section of the page contains text? The popup window could either contain the contents of the critical information section or just a visual warning that such information exists on the main page. I have a pretty good knowledge of VBA but sadly my knowledge of php and javascript is very limited.
View Replies !
|