file($url) problem - fulling server into thinking you're a web browser

From: Leester (lreilly_at_lanl.gov)
Date: 12/15/03


Date: 14 Dec 2003 16:28:32 -0800

Hi there,

I want to try and grab the HTML of a web page, but I have a little
problem - the web designer/developer of the page! He made it one of
those pages that displays "Please update your browser. This web site
does not support Netscape Naivagator version 1.234" if it "thinks"
your browser isn't up to par.

When I try to use PHP file($URL) function to grab the HTML, my request
doesn't have any header information informing the server what my web
browser is, so I get this message:

Is there any way to fool it my providing bogus meta/header information
in my request? Is there another solution?

Anyone have any ideas? Thanks in advance.

- Best regards,
  Lee



Relevant Pages

  • Re: How to write something to a html textfield and send it?
    ... > added to it (look below for html). ... I've never had any desire to automate a browser, ... agent to post the request and retrieve the response. ... Most non-trivial HTML forms use HTTP POST requests. ...
    (comp.programming)
  • Re: How to measure HTML Page Load Time?
    ... If this does what I think it does it is measuring the time between a) when the browser has received the HTML file, decoded it, done a few other things and finally decided to hive that CDATA off to the javascript engine and b) when the browser has finally decided that the page has been fully downloaded and rendered. ... Except that CSS is usually a static request. ... #3 - perceived visual rendering. ...
    (comp.lang.javascript)
  • Re: How to write something to a html textfield and send it?
    ... No need for controlling any particular browser. ... I'm not familiar with HTTP user ... >> used easily to detect the html tags and the required textfield. ... or do you just need to submit the request with the appropriate ...
    (comp.programming)
  • Re: AJAX + Webbroker
    ... // HTTPRequest ... // First het which browser we are working in. ... then the server is processing request. ... Now the HTML ...
    (borland.public.delphi.non-technical)
  • Re: $HTTP_REFERER crashes my system like clockwork
    ... Client sends a GET request for a particular URL... ... one of the headers for the html data that is sent. ... As it parses the HTML code, ... tells the browser that there's a stylesheet involved with the page, ...
    (comp.lang.php)