trochia Posted January 17, 2007 Share Posted January 17, 2007 Good day to all, I am fairly new to php and having a cookie problem I think. I have a .swf file that I would like to "run once" when the visitor first comes to the "index" of the site in maybe a 24 hour period. It would then become static ( .jpg ) when going thru the rest of the site for the 24 hours or whatever it is set at. Any help would be greatly appreciated.Jim Link to comment https://forums.phpfreaks.com/topic/34568-run-once-fash-then-static-jpg/ Share on other sites More sharing options...
Gruzin Posted January 17, 2007 Share Posted January 17, 2007 Yes, u can use cookies. something like this:if (cookie is set){JPG here}else{SWF here}it should give u an idea....Regards,George Link to comment https://forums.phpfreaks.com/topic/34568-run-once-fash-then-static-jpg/#findComment-162809 Share on other sites More sharing options...
trochia Posted January 17, 2007 Author Share Posted January 17, 2007 George, thanks for the reply... Here's in my index =if(!isset($_COOKIE['flash_cookie'])){ @setcookie('flash_cookie', 1, time() + (60*5), '/', '.domain.com', 0);}then this, is in my functions.php =<?php if(!isset($_COOKIE['flash_cookie'])){ ?> <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0" ID=Untitled WIDTH=720 HEIGHT=130> <PARAM NAME=movie VALUE="images/nw.swf"> <PARAM NAME=quality VALUE=high> <PARAM NAME=loop VALUE=False> <param NAME="wmode" Value="transparent";> <EMBED src="images/nw.swf" loop=false quality=high WIDTH=720 HEIGHT=130 TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"> </EMBED> </OBJECT> <?php }else{ ?> <img src="images/_bannerstrip.jpg" width="720" height="130" border="0"><?php } ?> Link to comment https://forums.phpfreaks.com/topic/34568-run-once-fash-then-static-jpg/#findComment-162816 Share on other sites More sharing options...
trochia Posted January 17, 2007 Author Share Posted January 17, 2007 I guess nobody has done this yet? :-) Link to comment https://forums.phpfreaks.com/topic/34568-run-once-fash-then-static-jpg/#findComment-162879 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.