Find the answer to your Linux question:
Results 1 to 2 of 2
Hi All, Please can someone tell me what I am doing wrong. I want to upload my WAN IP address to my web site at NTLWORLD so I can check ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Jun 2005
    Posts
    4

    FTP File to web server


    Hi All,

    Please can someone tell me what I am doing wrong.

    I want to upload my WAN IP address to my web site at NTLWORLD so I can check if my IP address changes.
    I have seen web sites offering software to upload the IP address to them, but why pay them this service when it can be done for free.

    I have looked into creating a script such as:

    lynx -cmd_script=weblog http://192.168.2.1 > ip_address

    I will then parse the file to extract the IP address information and possibly write it back.

    Then to upload the file ip_address

    ftp
    open
    upload.ntlworld.com
    username
    password
    put ip_address

    But now realise this does not work from a script.
    I tried using the macdef option but still can not get it to work.

    Please can someone tell me how to do this or how to do it a better way

    Thanks in Advance

  2. #2
    Just Joined!
    Join Date
    Jun 2005
    Posts
    4
    Do not worry, I have sourced an answer to my question.

    In case anyone else has a similar problem hefre is the script I am now using:

    #!/bin/sh
    HOST='ftp.users.qwest.net'
    USER='yourid'
    PASSWD='yourpw'
    FILE='file.txt'

    ftp $HOST <<END_SCRIPT
    user $USER
    $PASSWD
    put $FILE
    quit
    END_SCRIPT
    exit 0

    This worked first time.

    In case you want to see ore examples vist
    http://www.users.qwest.net/~eballen1/scripting.ftp.html

Posting Permissions

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