Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast
Results 1 to 15 of 54
  1. #1
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Grin How to Get the ip from the user

    I hope some one can send me a tip about this issue


    Do Exist any how to get the ip off the User and send it some how back to me


    thanks in Advance

    By The Way, have a nice Day

  2. #2
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    Have a look at System.GetLANInfo to get IP.

    As for how you send it back to you...could be a FTP or HTTP based solution.

  3. #3
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Code:
    TextFile.WriteFromString(_TempFolder.."\\ip.txt", HTTP.Submit("http://luacom.net/ip.php", {}, SUBMITWEB_GET, 20, 80, nil, nil));
    
    FTP.Connect("server-goes-here.com", "username", "password", "", true);
    
    FTP.Upload(_TempFolder.."\\ip.txt", "ip_"..Math.Random(10000000000)..".txt", nil);

  4. #4
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Great Shoot

    Thanks Trying today

    It will be fun

    Thanks Again

  5. #5
    Join Date
    Jun 2001
    Location
    California
    Posts
    2,014

  6. #6
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    PHP file:
    PHP Code:
    <?
         
    if(getenv("HTTP_X_FORWARDED_FOR")) {
            
    $ip getenv("HTTP_X_FORWARDED_FOR");
          } elseif(
    getenv("HTTP_CLIENT_IP")) {
            
    $ip getenv("HTTP_CLIENT_IP");
          } else {
            
    $ip $_SERVER["REMOTE_ADDR"];
          }
    echo 
    $ip;
    ?>
    AMS:
    PHP Code:
    IP=HTTP.Submit("http://adresstophpfile.com/filename.php", {}, SUBMITWEB_GET2080nilnil));
    Dialog.Message("Your IP Adress"IP); 
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

  7. #7
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Nice, That will do The Trick

    Elevation for you People Thanks

    Solving and complementing your stuf with my Stuff

    Wish you Fun

    Bytes

  8. #8
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Arrow Do this Store the ip somewhere or it is just to see the ip

    Quote Originally Posted by C B programming and webdesign View Post
    PHP file:
    PHP Code:
    <?
         
    if(getenv("HTTP_X_FORWARDED_FOR")) {
            
    $ip getenv("HTTP_X_FORWARDED_FOR");
          } elseif(
    getenv("HTTP_CLIENT_IP")) {
            
    $ip getenv("HTTP_CLIENT_IP");
          } else {
            
    $ip $_SERVER["REMOTE_ADDR"];
          }
    echo 
    $ip;
    ?>
    AMS:
    PHP Code:
    IP=HTTP.Submit("http://adresstophpfile.com/filename.php", {}, SUBMITWEB_GET2080nilnil));
    Dialog.Message("Your IP Adress"IP); 
    So this one it is only to read the ip or does store some place at the server i wish to know the ip off the user who is using my program.

    do this work like that

  9. #9
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Do i Did Rigth

    Quote Originally Posted by ShadowUK View Post
    Code:
    TextFile.WriteFromString(_TempFolder.."\\ip.txt", HTTP.Submit("http://luacom.net/ip.php", {}, SUBMITWEB_GET, 20, 80, nil, nil));
    
    FTP.Connect("server-goes-here.com", "username", "password", "", true);
    
    FTP.Upload(_TempFolder.."\\ip.txt", "ip_"..Math.Random(10000000000)..".txt", nil);
    Do i did it rigth

    TextFile.WriteFromString(_TempFolder.."\\ip.txt", HTTP.Submit("http://www.mysite.com/ip.php", {}, SUBMITWEB_GET, 20, 80, nil, nil));

    FTP.Connect("ftp://mysite.com/", "login", "password", "", true);

    FTP.Upload(_TempFolder.."\\ip.txt", "ip_"..Math.Random(10000000000)..".txt", nil);

    do i need to replace the word _TempFolder.. with my folder all ready created at the ftp server
    Attached Images

  10. #10
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    No, you need to tick the FTP Action Plugin in the Plugins dialog.

  11. #11
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Where is the ip.txt uploaded

    Quote Originally Posted by ShadowUK View Post
    No, you need to tick the FTP Action Plugin in the Plugins dialog.
    Where is the ip.txt uploaded, at the server?

  12. #12
    Join Date
    Oct 2007
    Location
    Gensokyo
    Posts
    1,324
    Quote Originally Posted by DaSoulRed View Post
    Where is the ip.txt uploaded, at the server?
    Yes. It's uploaded to your FTP server. As ip-*RANDOM*.txt

  13. #13
    Join Date
    Aug 2007
    Location
    Leon, Mexico.
    Posts
    406

    Arrow Do i need another file or other code becouse

    Quote Originally Posted by ShadowUK View Post
    Yes. It's uploaded to your FTP server. As ip-*RANDOM*.txt
    Do i need another file or other code becouse i cant find the random txt file u talk about

    i just change the url add login and pass add ftp server and i leave anything else

    TextFile.WriteFromString(_TempFolder.."\\ip.txt", HTTP.Submit("http://luacom.net/ip.php", {}, SUBMITWEB_GET, 20, 80, nil, nil));

    FTP.Connect("server-goes-here.com", "username", "password", "", true);

    FTP.Upload(_TempFolder.."\\ip.txt", "ip_"..Math.Random(10000000000)..".txt", nil);

  14. #14
    Join Date
    Aug 2004
    Location
    Somewhere in Texas, USA
    Posts
    417
    If all is working correctly you should see the file on the FTP sever.

  15. #15
    Join Date
    Apr 2007
    Location
    Raalte, OV, Netherlands
    Posts
    3,287
    dude activate the FTP plugin, and what i would do is also add a value to an ini file wich IP is wich File... so you can read it with an application or with the naked eye...
    Bas Groothedde
    Imagine Programming :: Blog :: Familiar people here

    My AMS Plugins:

+ Reply to Thread
Page 1 of 4 1 2 3 ... LastLast

Similar Threads

  1. Vista Current User
    By Mikkeee in forum Setup Factory 7.0
    Replies: 1
    Last Post: 06-27-2007, 11:53 AM
  2. Setup Factory and VS 2005
    By vazir786 in forum Setup Factory 7.0
    Replies: 4
    Last Post: 01-13-2006, 08:47 PM
  3. How do I get the exit status of a program?
    By ahewgill in forum AutoPlay Media Studio 5.0
    Replies: 2
    Last Post: 07-22-2004, 03:46 PM
  4. HOWTO: Prompt the User for Confirmation Before Exiting
    By Support in forum AutoPlay Media Studio 4.0 Examples
    Replies: 0
    Last Post: 10-03-2002, 09:50 AM
  5. Win 2000 user privileges issue
    By ibrod in forum Setup Factory 6.0
    Replies: 2
    Last Post: 12-18-2001, 10:05 AM

Posting Permissions

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