Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6954717
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T14:38:31+00:00 2026-05-27T14:38:31+00:00

My motive is to get the hosting provider of a domain name using php.

  • 0

My motive is to get the hosting provider of a domain name using php.
When tracert/traceroute to any domain name (yahoo.com), it gives:


    traceroute to 72.30.2.43 (72.30.2.43), 30 hops max, 40 byte packets
     1  c1.25.78ae.static.theplanet.com (174.120.37.193)  0.648 ms  0.630 ms  0.647 ms
     2  te6-2.dsr02.dllstx2.networklayer.com (70.87.254.237)  0.365 ms  0.430 ms  0.462 ms
     3  te7-4.dsr02.dllstx3.networklayer.com (70.87.253.121)  0.562 ms te4-3.dsr02.dllstx3.networklayer.com (70.87.255.129)  0.910 ms te4-4.dsr02.dllstx3.networklayer.com (70.87.255.133)  0.664 ms
     4  ae17.bbr01.eq01.dal03.networklayer.com (173.192.18.226)  0.403 ms ae17.bbr02.eq01.dal03.networklayer.com (173.192.18.230)  0.380 ms  0.405 ms
     5  ae1.bbr01.cf01.den01.networklayer.com (173.192.18.139)  14.864 ms  14.723 ms  14.770 ms
     6  ae1.bbr01.cf01.den01.networklayer.com (173.192.18.139)  14.787 ms 198.32.216.25 (198.32.216.25)  14.882 ms  14.946 ms
     7  198.32.216.25 (198.32.216.25)  14.863 ms ae-7.pat1.pao.yahoo.com (216.115.101.128)  38.403 ms ae-7.pat1.sjc.yahoo.com (216.115.101.149)  41.250 ms
     8  ae-1-d420.msr1.sk1.yahoo.com (216.115.106.161)  38.930 ms ae-1-d400.msr1.sk1.yahoo.com (216.115.106.153)  41.643 ms ae-0-d210.msr2.sk1.yahoo.com (216.115.106.133)  38.617 ms
     9  te-8-1.bas-k1.sk1.yahoo.com (68.180.160.9)  41.478 ms te-9-1.bas-k2.sk1.yahoo.com (68.180.160.15)  39.368 ms ae-0-d230.msr2.sk1.yahoo.com (216.115.106.141)  42.650 ms
    10  * * te-8-1.bas-k2.sk1.yahoo.com (68.180.160.11)  41.787 ms
    11  * * *
    12  * * *
    13  * * *
    14  * * *
    15  * * *
    16  * * *
    17  * * *
    18  * * *
    19  * * *
    20  * * *
    21  * * *
    22  * * *
    23  * * *
    24  * * *
    25  * * *
    26  * * *
    27  * * *
    28  * * *
    29  * * *
    30  * * *

I want to get to the last valid domain name, which is (in this case):

`10  * * te-8-1.bas-k2.sk1.yahoo.com (68.180.160.11)  41.787 ms`

I can get to this easily by using this code (stristr()):


    $a = explode("\n",$str);
    foreach($a as $v){
        if(!stristr($v,'* * *')){
            echo $v.'
'; } }

I need this result:


    yahoo.com

it should be from the # 10th (10 * * te-8-1.bas-k2.sk1.yahoo.com (68.180.160.11) 41.787 ms)

Does anyone has a solution to this? Or if someone has better solution to my basic objective here.

Would really appreciate any help.

Thank you!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T14:38:32+00:00Added an answer on May 27, 2026 at 2:38 pm
    //Cut the excess off.
    
    $starPos = strpos($str,'* * *');
    $subSet = substr($str,0,$starPos);
    $a = explode("\n",$subSet);
    $last = $a[count($a)-2] ;
    
    //Preg match the domain
    echo "RESULT: ";
    if (preg_match('/\.([^\.]*?\.[^\.]*?)\s\(\d/i', $last, $regs)) {
        echo $result = $regs[1];
    } else {
        echo $result = "";
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I create a table using PHP from a database, meaning the size of the
Motive: Passing struct to functions such as we can change it in any function
My basic motive to see the all request of mobile app. Suppose any app
Motive I'm trying to create a small demo application using WebGL. I chose to
my question is probably identical and have same motive as this here i ain't
I want to have something like MOTIVE { GET_PLAYER, GET_FLAG } . And in
Is there any way, in C++, to define nested macros/constants within a class, in
I'm using 2 pluigins for rounded corners, one for all navigators and DD_Roundies for
I have the following problem and any help would be appreciated. Let's assume we
Motive : I have a decimal property in a class which I wish to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.