Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    Is there a way i can echo yhe visitors IP address and date in flash
    Regards Phil,


  2.  

  3. #2
    Senior Member raspberryh's Avatar
    Join Date
    Aug 2004
    Location
    Erie, PA
    Posts
    882
    Member #
    7208
    Liked
    1 times
    I don't think that you can get the IP address directly from Flash. But one thing I know you can do is get it with PHP and then feed that to Flash...

    Have some PHP file like getdata.php, and put this in it:
    PHP Code:
    <?
    echo "ip=" getenv('REMOTE_ADDR');
    echo 
    "&date=" date();
    ?>
    Then in your Flash file have something like:
    Code:
    loadVariablesNum("getdata.php", 0);
    But, you may have to wait until the text is loaded. I remember adding this to the bottom of my text file of flash vars:
    PHP Code:
    echo "&textloaded=OK"
    Then, on, say, the first frame of your flash movie, you'd say something like
    Code:
    if(textloaded == "OK")
     gotoAndPlay("3");
    And on frame 2,
    Code:
    gotoAndPlay("1");
    So it will keep looping b/w frames 1 and 2 until the variables are loaded. Once they're loaded, it will skip to frame 3, and you can use your variables.

    Heather
    choosy developers choose gif!
    website | paintings | blog

  4. #3
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    Exactly what I was going to suggest: write a ridiculously simple PHP script that dumps the IP address ($_SERVER['REMOTE_ADDR']), then request the contents via Flash.
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!

  5. #4
    Senior Member leprechaun13's Avatar
    Join Date
    May 2005
    Location
    Northampton
    Posts
    487
    Member #
    10058
    Thanks for your help guys
    Regards Phil,



Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 11:25 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com