How to get the current URL ?

Discussion in 'PHP' started by technojuice, Jul 30, 2008.

  1. #1
    Hello,

    Any help is appreciated ! If i try to get file_get_contents(http://tinyurl.com/yvqjra) it automatically redirects me to forums.digitalpoint.com

    how can the script find out that the current url ?
     
    technojuice, Jul 30, 2008 IP
  2. Scorpiono

    Scorpiono Well-Known Member

    Messages:
    1,330
    Likes Received:
    35
    Best Answers:
    0
    Trophy Points:
    120
    #2
    It uses header redirect, so it will grab a header redirect and content from forums.digitalpoint.com
     
    Scorpiono, Jul 30, 2008 IP
  3. technojuice

    technojuice Peon

    Messages:
    207
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    How will the script know that the domain has changed ?
     
    technojuice, Jul 30, 2008 IP
  4. Barti1987

    Barti1987 Well-Known Member

    Messages:
    2,703
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    185
    #4
    Barti1987, Jul 30, 2008 IP
  5. technojuice

    technojuice Peon

    Messages:
    207
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yep this is exactly wat i was looking for
     
    technojuice, Jul 30, 2008 IP
  6. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #6
    nico_swd, Aug 9, 2008 IP