Closed Thread Icon

Topic awaiting preservation: Getting the URL of a site Pages that link to <a href="https://ozoneasylum.com/backlink?for=25999" title="Pages that link to Topic awaiting preservation: Getting the URL of a site" rel="nofollow" >Topic awaiting preservation: Getting the URL of a site\

 
Author Thread
AT
Bipolar (III) Inmate

From: Gainesboro, TN, USA
Insane since: Aug 2000

posted posted 06-09-2005 01:55

Hello once again my beautiful people.

Here's the run down of what I need, and what I think is stopping me.

I need to be able to record a URL that is being transferred to another domain.
There is a link exit script that forwards you to the real domain.

So lets say we had this setup. http://ww.example.org/links.php?linkid=345
When we go to that, it then redirects us to the real site.

What I need to be able to do is have a list of these referer URL's and be able to find out what the REAL url is.

I'm using PHP for the other part of the script that requires this.

Anyone know of a way to do this?

Thanks!

Casey / AT
Personal
Song Lyrics
Family Recipes

Emperor
Maniac (V) Inmate

From: Cell 53, East Wing
Insane since: Jul 2001

posted posted 06-09-2005 02:07

I've had a quick discussion with AT about this over ICQ (as I wasn't very clear on what he was after) and it appears it is the following.

There is another site (which he has no control over) using a redirect script and he needs to find out where the script redirects to (presumably using some kind of script to automate the process.

My first thought would be to run through the linkid and record the URL that comes up - it would depend on their redircting but if you did that it may be you'd find the URL anyway (esp. if the redirect was server side).

___________________
Emps

The Emperor dot org | Justice for Pat Richard | FAQs: Emperor | Site Reviews | Reception Room

if I went 'round saying I was an Emperor just because some moistened bint had lobbed a scimitar at me, they'd put me away!

bitdamaged
Maniac (V) Mad Scientist

From: 100101010011 <-- right about here
Insane since: Mar 2000

posted posted 06-09-2005 03:17

What scripting language?

Redirects are done using a header normally. I'd use php's get_header('www.example.com') function to retrieve the headers and parse them.

If it's a javascript or meta tag redirect then you just need to parse the page.

If you look at the PHP documentation for get_headers there's a PHP4 workaround as well.

Also I'd do more but I can't use this function with DH (see earlier post)



.:[ Never resist a perfect moment ]:.

(Edited by bitdamaged on 06-09-2005 04:08)

AT
Bipolar (III) Inmate

From: Gainesboro, TN, USA
Insane since: Aug 2000

posted posted 06-09-2005 04:56

Hey bit,

I'm using PHP 4.3.9, so the get_headers wont work for me.

But this does.

code:
$fp = fopen('http://www.example.com', 'r');
echo $http_response_header[10];




Thanks

Casey / AT
Personal
Song Lyrics
Family Recipes

(Edited by AT on 06-09-2005 04:57)

« BackwardsOnwards »

Show Forum Drop Down Menu