Comment posted on Random Flash SWF Onload PHP Script by King

@sid: Just refresh the page. Its random! Remember?

King also commented

  • @Francisco Aldunate: There is a wmode parameter for flash files to make these transparent.
    See here: http://www.techmynd.com/how-to-make-swf-background-transparent/
  • @Kevin: Okay you have to just change swf in following line
    if (eregi(“swf”, $file))
    which becomes
    if (eregi(“jpg”, $file))
    in case of jpg images
    and change the lines in echo for images.
    echo > img src tags instead of embed tags
    See the second example I posted above.
  • @Kevin: Of course. Just try that. Echo that whatever you want in loop. Any file.

Recent comments by King

  • Remove Comments Section From Your WordPress Blog
    @maskofZoro: Yes. Remove “comments not allowed” line from comments.php in blog theme file.
  • Upload File – Send HTML Format Email with Attachment Using PHP
    @Bentot: @Ryan: @Kev Neal: @dupreelove: @asda: @Victor: I am sorry for late reply. There was a little glitch.

    request variables part was missing. You have to request variables named as from, emaila and filea in the php script. filea does not need to be request probably.

    This was working for Globals ON and was not working for Globals off environment of PHP which was default. I have changed the code and downloadable file. Please check this again. Now it is working.

    To add more fields e.g. phone number, company, comments etc. Just add these input fields in form and request these in PHP file and finally include these in email_message variable.

    Latest version of this script is coming soon.

  • Change Color Theme With PHP – CSS Switch
    @Adz: It will now work for you. Request variable set in switcher.php file. It was missing. Download file again or read the tutorial again – switcher file section.
  • Tell A Friend PHP Referrer – Recommend Site Script
    @net biz: There are two things. Email from where that email is coming from to you? Do not use user’s email. Use info@yourserver.com kind of email or any email that is set at your webhost. Second thing is concentrate. When email arrives in inbox, it has a name, email and subject. Make sure these are right. Email is important. If the server recognizes the right email it will not go in spam. Make the email which you have at your web host not spam in your inbox.
  • Change Color Theme With PHP – CSS Switch
    @Chad: Make sure blue.css or black.css or whatever css which applies only applies to the area or Div which you desire. and Inner portion can use your regular CSS.

    @jinney: Okay! Just call the variable in PHP file. Request the variable named as ‘set’. I am also updating the code. You localhost php.ini has Globals On and online hosts have Globals Off. Globals off is the right choice.
    Read this:
    http://www.phpmagicbook.com/category/post-get/

powered by SEO Super Comments

  • Share/Bookmark

, , , ,

16 Reviews

  1. joe says:

    this is the best solution of any that I have seen.

    Thank you!!

  2. Kevin says:

    Thanks … this has been a life saver for me. I do have a question though. Once a random swf is playing, can it be set to play the other files in the directory in an endless loop until the page is reloaded?

  3. King says:

    @Kevin: Of course. Just try that. Echo that whatever you want in loop. Any file.

  4. Kevin says:

    I should have mentioned that I’m just learning … how do I do that? Thanks again!

  5. King says:

    @Kevin: Okay you have to just change swf in following line
    if (eregi(“swf”, $file))
    which becomes
    if (eregi(“jpg”, $file))
    in case of jpg images
    and change the lines in echo for images.
    echo > img src tags instead of embed tags
    See the second example I posted above.

  6. Kevin says:

    Great … thanks again!

  7. me the script works correctly, but what if I want to put a swf with transparent background? Where do we draw the parameters?

  8. sid says:

    hi nice script..used it..and working fine. i have a question, though. how can we make it go to next swf or previous swf files?

  9. Sheetal says:

    Hi
    Thanks for this wonderful information it help me alot..

  10. King says:

    @sid: Just refresh the page. Its random! Remember?

  11. King says:

    @Francisco Aldunate: There is a wmode parameter for flash files to make these transparent.
    See here: http://www.techmynd.com/how-to.....ansparent/

  12. Betsy says:

    I have been searching forever for a script like this. Thanks!!! I do have one question though. I am only working with 3 swf files right now and it pulls up the same one over and over quite often. Is there a way to change this code to make it pull them in order instead of randomly? I am very, very new to PHP so please be specific. Thanks for you help.

  13. Jim says:

    WOW!… amazing… this has been a tough one to find out there.

    Is there a way that I can supress the #55555 random number at the end of the url?

  14. Travis says:

    Awesome code thanks! Is there a way to have it pull random files from a folder that contains gifs and swf files. For instance, on one load it might be a swf but on another load it may be an animated gif.

  15. flashcode says:

    Is it possible to allow full screen in the PHP code?