Access remote URL php

Discussion in 'PHP' started by champ_rock, Nov 1, 2007.

  1. #1
    hi

    i want to make a simple script which will basically open a remote URL but in a different way

    here is what i want
    1. there is a url xyz.com/link which immediately redirects to xyz.com
    2. i want the script to access xyz.com/link and not be redirected to xyz.com and output only the data of xyz.com/link

    what php function do i need to use for this?

    thanks
     
    champ_rock, Nov 1, 2007 IP
  2. crazyryan

    crazyryan Well-Known Member

    Messages:
    3,087
    Likes Received:
    165
    Best Answers:
    0
    Trophy Points:
    175
    #2
    It depends what kind of redirect and where the redirect is, if it's a meta redirect at the bottom of the page it can be done, if it's a header redirect at the bottom of the page it can be done, if it's a header redirect at the top of the page, I dont think it can be done, same with 301 redirects.
     
    crazyryan, Nov 1, 2007 IP
  3. champ_rock

    champ_rock Peon

    Messages:
    3,349
    Likes Received:
    115
    Best Answers:
    0
    Trophy Points:
    0
    #3
    xyz.com/link logs the visit in a database and then redirects me to the homepage

    i dont want to go to the homepage at all.. but just to stop at that database visit to get that recordd
     
    champ_rock, Nov 1, 2007 IP
  4. brendandonhue

    brendandonhue Peon

    Messages:
    45
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #4
    brendandonhue, Nov 1, 2007 IP
  5. tamen

    tamen Peon

    Messages:
    182
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Is there even any output on the page you want?

    Usually when I make a redirect-page, it just redirects and shows no output. Unless of course it's a javascrip/meta-redirect.
     
    tamen, Nov 1, 2007 IP