Flash Advisor logo
:: Desktop Shortcut
:: Flash Help
Advice from Experts

Closed Thread
Results 1 to 3 of 3

Hybrid View

  1. #1

    Default Displaying IP Address

    I was wondering if anybody can help,

    I have only just started using flash/dreamweaver....... I have made up a contact form in flash that posts to a CGI script. On the form itself I want to display the users IP address, this is to stop people abusing the form.

    I have no problem using something like shtml to get the ip but I do not know how to pass that variable into flash or if there is an easier way just using action script itself

    Thanks for the help in advance

    Grimmis

  2. # ADS
    Join Date
    Always
    Posts
    Many
     
  3. #2
    Join Date
    May 2003
    Location
    india
    Posts
    202

    Default

    Hi friend,

    to get the ip use remote_addr and use with flash like below

    make a variable in flash name IP

    call the swf

    Code:
    filename.swf?IP=remote_addr
    Try it , i hope it will help you!

    regards
    jeet

  4. #3

    Default

    I'm afraid there are numerous reasons why that wouldn't work.

    Firstly you would need to save to file to some PHP enabled webspace, once you've done that you need to save the document with the swf embedded into it as a .php doc.

    The keyword jeet mentioned is correct although it needs to written in caps and have a dollar sign in front of it, like this $REMOTE_ADDR

    To embed it into the document however it will not suffice to say filename.swf?IP=$REMOTE_ADDR
    you need to tell it that that bit is php, output the resulting IP with an echo like such:

    <OBJECT classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0"
    WIDTH="550" HEIGHT="400" id="test" ALIGN="">
    <PARAM NAME=movie VALUE="test.swf?IP=<?php echo $REMOTE_ADDR ?>"> <PARAM NAME=quality VALUE=high> <PARAM NAME=bgcolor VALUE=#FFFFFF> <EMBED src="test.swf?IP=<?php $REMOTE_ADDR?>" quality=high bgcolor=#FFFFFF WIDTH="550" HEIGHT="400" NAME="test" ALIGN=""
    TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
    </OBJECT>

    Not the bold bits which are the only real pieces of information that will interest you.

    Good Luck,
    Taff

    p.s. could I ask a silly question? What is SHTML? Ive never come across it before!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. Loading and displaying multiple external jpegs
    By matej in forum Flash Scripting
    Replies: 2
    Last Post: 11-14-2008, 06:03 PM
  2. Flash player not displaying all the objects
    By Spy6 in forum Advanced Flash
    Replies: 3
    Last Post: 08-22-2007, 09:07 AM
  3. How to Check the URL Address of Flash on Internet ?
    By jackyowyewhong in forum General Flash
    Replies: 1
    Last Post: 12-01-2005, 09:24 AM
  4. URL address for Flash Sample Code
    By yttan in forum Advanced Flash
    Replies: 0
    Last Post: 04-15-2005, 07:51 AM
  5. Replies: 2
    Last Post: 10-31-2003, 09:02 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Sponsors
Create Speaking Characters for your website and Flash movies. 15 Day Free Trial