Trace Network Redirects

redwings0921

New member
Apr 2, 2009
699
13
0
I want to find out who a network is brokering offers from. I know it is possible to find it through tracing the redirects of the affiliate link, but completely forget how. Anyone wanna help me out?
 


sounds like a useful tool we could all use.
if you guys start listing off known tracking link domains and what networks own them I'll whip up a quick tool to follow redirects and identify networks from them.
 
fiddler did exactly what i wanted, and once you get the tracking links it is not hard to connect them to a network. it is incredible how many times an offer may be brokered before it gets to you
 
sounds like a useful tool we could all use.
if you guys start listing off known tracking link domains and what networks own them I'll whip up a quick tool to follow redirects and identify networks from them.

That would be awesome. If someone could setup a webpage where you can report new tracking domains for networks (those that have multiple) we could have a running list.

Tracking Domain: ____________
Network:_____________
Other Known Tracking Links:____________

Something like that ^

Edit: I was just thinking and tons of networks list their tracking domains on Affiliate Paying. It's one of the fields of information on each network. Some even have multiple listed.
 
Does anybody have the source code (or knows where to get the source code) for a tool like this?

I'm looking at using a script like this internally for a project I have and there's no reason for me to code this from scratch if source code for this script already exists.

Found it online. Here is the source for anybody who cares.
Code:
// Find location of redirect
function loc_redirect($url) {
 
 # 1. Prevent redirects
 $opts = array('http' =>
  array('max_redirects'=>1,'ignore_errors'=>1)
 );
 stream_context_get_default($opts);
 
 # 2. Get headers (does not take context argument like file_get_contents)
 $headers = get_headers($url,true);
 
 # 3. Restore stream settings
 $opts = array('http' =>
  array('max_redirects'=>20,'ignore_errors'=>0)
 );
 stream_context_get_default($opts);
 
 # 4. Extract http request status code
 $status = $headers[0];
 list($protocol,$code,$message) = split(' ',$status,3);
 
 # 5. Find redirect
 return ($code>=300 && $code<400) ? $headers['Location'] : FALSE;
}
 
^ that will handle 3XX redirects but I don't think it will do javascript redirects and the like. I think using cURL might be a better option. I'll report back if I can come up with a more robust solution.