Using Php for redirect

Status
Not open for further replies.

Volume

New member
Aug 2, 2007
176
1
0
Quick question, I'm using php to mask my affiliate links like this

<?php
header('location:hxxp://www.example.com?affiliatelinkID=12345')
?>

The html file looks like this

<a href="hxxp://www.mysite.com/ads.php"><img src="hxxp://www.cpaclicks.com/imageredirect.asp?a=myafiiliateid" alt="" border="0"></a>

My affiliate id is still on my img link on the html page which anyone can view by going to the page source. Where and how do I hide the image source link? Can I add it to the same php page above? Any help would be awesome, thanks. :bowdown:
 


Is there a way to put it into the same php code?

<?php
header('location:hxxp://www.example.com?affiliatelinkID=12345' Can I put link to image source here somewhere?)
?>
 
Is there a way to put it into the same php code?

<?php
header('location:hxxp://www.example.com?affiliatelinkID=12345' Can I put link to image source here somewhere?)
?>

No.
you might be able to put in something like

Code:
$fh=fopen( "IMAGESOURCE", "r" );
if ( $fh ) {
  while( ! feof( $fh ) ) $trash=fread( $fh, 4096);
  close( $fh );
}

Which is a basic scraping function. Just throw out the $trash variable. But you may not need to do this. Check with your affiliate manager.

No, I'm serious :)

What you have on one page is:
blah blah blah
tracking image source
link
blah blah blah

what you're trying to do is have a link to a page where the user lands and they're redirected immediately to the next page. Depending on what your AM says, you may or may not want that "tracking image source" stuff. It's just, well, it's essentially a second check for the referral.

It may also be adding a cookie. :P Which won't be added if you just read the image info and discard the variable.
 
I don't know if this will help you or not, but, I use a little php script for both links and pictures. Its not what you showed. Its in a seperate file but works just fine. PM me if you want me to send it to you.
 
Status
Not open for further replies.