Page 2 of 2

Re: How to prevent my website being retrieved by someone else ?

Posted: Fri Mar 28, 2008 3:05 pm
by Barzouk
idy wrote:OK I tried :

Code: Select all

 
$url = "http://www.petitscailloux.com/Follow.aspx?sUrl=http://www.seloger.com/199986/16271207/detail.htm";
ini_set('user_agent', 'Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.6) Gecko/20060728 Firefox/1.5.0.6');
echo file_get_contents($url);
 

I just tried your code. it is working.

Re: How to prevent my website being retrieved by someone else ?

Posted: Fri Mar 28, 2008 4:20 pm
by idy
Sorry about that - tried with my localhost, worked fine apparently (although not on my FTP and it works there fine with other URLs), but look carefully :
the value displayed by the file_get_contents to the right of "Nombre de jours" is different from the actual value when doing the direct http request (i.e. just browsing to the page). And every time I run my code, the value retrieved is different - how can that be ?

Thx !!

Re: How to prevent my website being retrieved by someone else ?

Posted: Sat Mar 29, 2008 12:54 pm
by Barzouk
what are you trying to do ?
Why not asking the webmaster to give you what you are looking for ?