please help me

Discussion in 'PHP' started by c-bolank, Mar 30, 2012.

  1. #1
    I have to check the site domain name, how to limit your search to only the domain name only? in this case I am using wordpress. My website: wtool [dot] in. Thanks in advance and if anyone can solve it I will give in return a domain name.
     
    c-bolank, Mar 30, 2012 IP
  2. Kavin Raja

    Kavin Raja Active Member

    Messages:
    4
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    56
    #2
    You mean, like if the entered text is example.com/index.php?id=... It should only consider example.com ?

    In that case pass the value to parse_url()

    For example:
    $data = parse_url('http://example.com/index.php?id=10');
    
    echo $data['host'];
    
    PHP:
     
    Kavin Raja, Mar 31, 2012 IP
  3. c-bolank

    c-bolank Well-Known Member

    Messages:
    293
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    100
    #3
    I mean not so, but this form only for domain names, not the other eg php fan, google com acc, etc.
    but thanks for answer my question
     
    c-bolank, Apr 3, 2012 IP
  4. c-bolank

    c-bolank Well-Known Member

    Messages:
    293
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    100
    #4
    problem solved, thanks all
     
    c-bolank, Apr 7, 2012 IP