Printer Friendly Version Print this thread
Email this thread to a friend eMail this thread to a friend
  • Baseball/Softball Team Management Software Site (In: I Want to Sell My Website)
  • 4 facts about earning money from lyrics site. (In: I Want to Sell My Website)
  • Paid Survey Site plus a 19k+ LIST - Over $2,700 - (In: I Want to Sell My Website)
  • Warcraft Accounts - Site For Sale (In: I Want to Sell My Website)
  • looking for free hosting site (In: I Want to Sell My Website)
  • Featured Web Site Template

    Hundreds More at Free Site Templates.com!

    Web Site Partners
    Sponsored Links
    Jet City Software
     
    Whos Here ?
    Reflects user activity within the last 5 minutes
    Moderator(s): Prowler, jcokos
    Member Message

    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2004-Aug-03 08:18
    Edit Message Delete Message Reply to this message

    What PERL script command will get the IP address that is associated with a particular domain name?



    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2004-Aug-03 08:29
    Edit Message Delete Message Reply to this message

    clarification:

    I want to get IP addresses of several domains to see if they share an IP address, what command will get the IP addresses for those domains?

    I could run PING in an MS-DOS shell to get the associated IPs to domains, but that is a pain as I can only ping one site at a time to return back to me the associated IP. I'd have to enter "ping [www.domain.com]", copy the ip address, and paste it into a file for each domain. Quite tedious. I'd rather run a perl script to automate that for me.



    Webmaster-Toolkit.com
    Joined: Jul 18, 2002
    # Posts: 1098

    View the profile for Webmaster-Toolkit.com Send Webmaster-Toolkit.com a private message

    Posted: 2004-Aug-03 10:35
    Edit Message Delete Message Reply to this message

    Something like this should work


    Code: [copy]




    with $domain holding the domain you want the ip for



    Webmaster-Toolkit.com
    Joined: Jul 18, 2002
    # Posts: 1098

    View the profile for Webmaster-Toolkit.com Send Webmaster-Toolkit.com a private message

    Posted: 2004-Aug-03 10:38
    Edit Message Delete Message Reply to this message

    bah, the forum is stripping out certain characters - I'll PM it to you and see if that works



    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2004-Aug-03 11:02
    Edit Message Delete Message Reply to this message

    Actually that's not what I needed, but thanks anyways :)

    I finally did find the piece of code I needed after hours of looking and typing in bunches of different query strings. Here's the PERL commands that I needed:


    Code: [copy]




    ...where the host variable is the known domain name.

    The only problem is that when that code hits a domain that can't be reached, it inadvertantly kills the script before it can cycle through the rest of the domain names to check. The only way I can make it go through the list of domains withing dying is to delete the problem domains and I have to find those one at a time. It would be nice if the program was smart enough to ignor the domains it couldn't reach and continue on down through the list of domains and write out the gathered data to a text file. Perhaps I'll have to do more research and testing to see about pinging the domain for successful connection before running that command. I might have a way to do that--we'll see.



    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2004-Aug-03 11:34
    Edit Message Delete Message Reply to this message

    The use Net::Ping; method isn't so great either. whenever the value returned is not "1" it is timed out and the routine skips getting the IP address. Doing a manual ping via MS-DOS window still returns the IP address even if it does time out. I need to find a way to get that ip address and when it doesn't find it, it skips and moves to the next domain name in the list of records.



    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2004-Aug-03 12:24
    Edit Message Delete Message Reply to this message

    got it to work:


    Code: [copy]







    Webmaster-Toolkit.com
    Joined: Jul 18, 2002
    # Posts: 1098

    View the profile for Webmaster-Toolkit.com Send Webmaster-Toolkit.com a private message

    Posted: 2004-Aug-03 13:51
    Edit Message Delete Message Reply to this message

    added to my code library wink



    Curt
    Joined: Eons Ago
    # Posts: 3747

    View the profile for Curt Send Curt a private message

    Posted: 2004-Aug-08 03:20
    Edit Message Delete Message Reply to this message

    haha guess my learning experience yielded helping someone else learn something too wink

    (that's the cool thing about a good forum)


    You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
    1. You have not yet logged in, or registered properly as a member
    2. You are a member, but no longer have posting rights.
    3. This is a private forum, for which you do not have permissions.

    If you are a recent member, it's possible that you simply have not yet confirmed your account. Please check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions contained within.

    If you cannot find this message, click here to Re-Send it.

    If you are still experiencing problem, please read the Login Assistance Article for some advice on what may be causing your login not to work properly.

    Switch to Advanced Editor and ... Create a New Topic or Reply to this Thread

    New posts Forum is locked
    © 1995  ·  iWeb, Inc  ·  DBA JimWorld Productions