Dynadot Aftermarket: discover domain gems worth investing in. Visit our aftermarket.

Rotating SWF Script, need help to complete

Namecheap AuctionsNamecheap Auctions
SpaceshipSpaceship
Namecheap AuctionsNamecheap Auctions
Watch

dumai

New Member
Impact
0
Someone wrote me this script which allows me to switch to a pure HTML page or
Flash embedded HTML page. Now I would like to use the script above to rotate my SWF files,

***but starting from " ECHO SRAND " I am having trouble coding it right. I think I am missing commas, slashes or ??? ***

Also without SRAND.... the script works fine.

Can anyone help me fix this, code below?

---------------------------------------------------------------------------

<?php
if ($_GET['choice']=="html"){
$_SESSION['format']=="html";
} elseif ($_GET['choice']=="flash") {
$_SESSION['format']=="flash";
}

if ($_SESSION['format']=="html") {
echo "<img src=\"images/fso_hometest.jpg\" width=\"776\" height=\"256\">";

}
elseif ($_SESSION['format']=="flash"){
$_SESSION['format']=="flash";

echo

srand ((double)microtime()*1000000);

//from 1 to the number of ads
$random_num = rand(1, 3);
$include_ad = "flash_banner" . $random_num . ".swf";


"<object classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\" width=\"776\" height=\"256\" id=\"tool_banner\" align=\"middle\">
<param name=\"allowScriptAccess\" value=\"sameDomain\" />
<param name=\"movie\" value=\"<? echo $include_ad; ?>\" />
<param name=\"quality\" value=\"high\" />
<param name=\"bgcolor\" value=\"#ffffff\" />
<embed src=\"<? echo $include_ad; ?>\" quality=\"high\" bgcolor=\"#ffffff\" width=\"776\" height=\"256\" name=\"tool_banner\" align=\"middle\" allowScriptAccess=\"sameDomain\" type=\"application/x-shockwave-flash\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />
</object>";
}
?>
 
Last edited:
0
Close
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
Help!!
 
0
Close
hmmm, not sure, im posting this to bump, see if anyone can help you
 
0
Close
DomainEasy: flexible LTO options. Close more domain deals with financing.

We're social

Escrow.com
Spaceship
Domain Recover
CryptoExchange.com

NamePros updates

Switch between accounts
You can now stay logged in to more than one NamePros account in the same browser. Click your avatar, then "Accounts in this browser", to...
AIVikings
Catchy
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back