dcsimg
A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: [MX] Testing :IP adress

  1. #1
    Member
    Join Date
    Dec 2004
    Posts
    33

    [MX] Testing :IP adress

    Is there a way of having code in a Flash that can actually detect what the IP address of the user is who is viewing that flash.
    What I want is have it so a user can only view a particular flash only once. Is it possible??

    Im not sure where to begin
    Lindsay

  2. #2
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    yes .........use a php script to get ipaddress and Loadvars to pull it into flash and process it.
    ~calmchess~

  3. #3
    Member
    Join Date
    Dec 2004
    Posts
    33
    haha oooooh well. Is there any tutorials you can link me to??? plz plz plz with sugar, icing and ben aflec on top?
    Lindsay

  4. #4
    Senior Member calmchess's Avatar
    Join Date
    Sep 2006
    Location
    Earth
    Posts
    2,588
    no but its an easy thing to google and most webhosts support php...google php ipaddress and flash loadVars
    ~calmchess~

  5. #5
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    or u can embed your flash movie in a php page itself and pass in the IP address using FlashVars...
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  6. #6
    Script kiddie VENGEANCE MX's Avatar
    Join Date
    Jun 2004
    Location
    England
    Posts
    2,590
    Had to use an IP code today, thought I may as well put it here:

    Flash (mySWF.swf):
    code:
    loadVariables("myip.php?r="+Math.random(), _root);
    onData = function() {
    trace(ip);
    };



    PHP (myip.php):
    PHP Code:
    <?php
        
    echo 'ip='.$_SERVER['REMOTE_ADDR'];
    ?>
    http://www.birchlabs.co.uk/
    You know you want to.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center