Help With PHP clone page

stealth

Newbie
Joined
Feb 29, 2008
Messages
4
Reaction score
0
Hi,

I am trying serve an affiliate page on my website using the following code
Code:
<?php
$file = file_get_contents ('hxxp://affiliate_site/');
Echo $file;
?>

It pulls the page text fine, but I am not getting any of the images from the original page, due too they are referenced ./images and I think the page I am pulling is trying to get the images from my site.

Is there a way to get these images, via PHP, without downloading them to my site?

Thanks
 
i would parse $file once its been received, write a script to go through the code and find the images. Then when the src property is found, stick the website url in front of it and then echo it to your page.

example:
Before: <image src="./background.png"></image>
After: <image src="http://www.mysite.com/./background.png"></image>
 
this is not so good method - if you have forms, you need to fix them too, images are easy fixed with mod_rewrite (check docs).
if your affiliate tracks domain where customer came research on mod_proxy and simply setup domain as proxy for affiliate.com
 
i would parse $file once its been received, write a script to go through the code and find the images. Then when the src property is found, stick the website url in front of it and then echo it to your page.

example:
Before: <image src="./background.png"></image>
After: <image src="hxxp://w3.mysite.com/./background.png"></image>

Gives me some additional areas to research...Thanks
 
this is not so good method - if you have forms, you need to fix them too, images are easy fixed with mod_rewrite (check docs).
if your affiliate tracks domain where customer came research on mod_proxy and simply setup domain as proxy for affiliate.com

ok...thanks for the info...I'm gonna be busy figuring this out :eek: maybe I will stick with iFrames LOL.
 
You can use curl do this.

Check out blog.unitedheroes.net/curl/ and read the first part about what _not_ to do.

If you are doing this server-side though, I think your AM is going to see your server's IP going to the offer a bunch of times rather than your visitor's.
 
Back
Top