how to capture url by php script?

Discussion in 'PHP' started by mr_share, Feb 27, 2012.

  1. #1
    To day! I wanto script php capture website. Can you help me?
     
    Solved! View solution.
    mr_share, Feb 27, 2012 IP
  2. entrecon

    entrecon Peon

    Messages:
    57
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try these:

    $_SERVER[HTTP_HOST] and $_SERVER[REQUEST_URI]
    PHP:
     
    entrecon, Feb 27, 2012 IP
  3. #3
    I'm not sure what you mean but try this:
    
    <?php
    $c = file_get_contents('http://www.example.com/');
    ?>
    
    PHP:
    or you can use curl.
     
    Arttu, Feb 28, 2012 IP
  4. Colbyt

    Colbyt Notable Member

    Messages:
    3,224
    Likes Received:
    185
    Best Answers:
    0
    Trophy Points:
    210
    #4
    Heck, you can also iframe it. All these answers are correct for various situations. Exactly what are you trying to do?
     
    Last edited: Feb 28, 2012
    Colbyt, Feb 28, 2012 IP