Re: Can a website block the use of file_get_contents ?




This is utterly brilliant, and got me screen scraping in no time.

Paul


Thanks Paul and C. - I tried it with curl as well, using the
curl_grap_page and curl with an ini_set of a generic user agent, but I
got the following error :
Thanks also to Jan, I will also have to try fsockopen.

Runtime Error
Description: An application error occurred on the server. The current
custom error settings for this application prevent the details of the
application error from being viewed remotely (for security reasons).
It could, however, be viewed by browsers running on the local server
machine.

Details: To enable the details of this specific error message to be
viewable on remote machines, please create a <customErrors> tag within
a "web.config" configuration file located in the root directory of the
current web application. This <customErrors> tag should then have its
"mode" attribute set to "Off".

<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>

Notes: The current error page you are seeing can be replaced by a
custom error page by modifying the "defaultRedirect" attribute of the
application's <customErrors> configuration tag to point to a custom
error page URL.

<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
</system.web>
</configuration>
.



Relevant Pages

  • Re: Deploy error on Remote Server
    ... > production Remote Server which has ASP.net ... This tag should then have its "mode" attribute ... The current error page you are seeing can be replaced by a custom ...
    (microsoft.public.dotnet.framework.aspnet)
  • Problems with application configuration (web.config)
    ... An application error occurred on the server. ... configuration file located in the root directory of the current web ... This tag should then have its "mode" attribute ... The current error page you are seeing can be replaced by a custom ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: Help!!!
    ... An application error occurred on the server. ... > "web.config" configuration file located in the root directory of the ... This tag should then have its "mode" ... The current error page you are seeing can be replaced by a custom ...
    (microsoft.public.sharepoint.portalserver)
  • Re: How To Create Custom Aspx Error Reporting Page
    ... An application error occurred on the server. ... "web.config" configuration file located in the root directory of the current ... This tag should then have its "mode" ... The current error page you are seeing can be replaced by a custom ...
    (microsoft.public.dotnet.framework.aspnet)
  • Running ASP.NET from Another Directory
    ... -CREATOR OWNER - No Permissions ... configuration file located in the root directory of the current web ... This tag should then have its "mode" attribute ... The current error page you are seeing can be replaced by a custom ...
    (microsoft.public.inetserver.asp.general)