Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > BOOK: Beginning JavaScript
|
BOOK: Beginning JavaScript
This is the forum to discuss the Wrox book Beginning JavaScript by Paul Wilton; ISBN: 9780764544057
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning JavaScript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 9th, 2006, 10:03 AM
Registered User
 
Join Date: Nov 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Using PHP to parse HTML files from other sites

Hi,

Assume there is a file with URL...

http://www.yoursite.com/UsefulFile.html

and we want to retrive some information using PHP, can we simply try and access this file as text file from
http://www.mysite.com/ProcessUsefulFile.php?

How do we go about it?

I want to parse HTML files from another site and extract information to store it...

What are the implications if the target file is a script...

Thanks.


 
Old May 27th, 2006, 06:00 AM
Authorized User
 
Join Date: Jun 2003
Posts: 79
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to erobb Send a message via Yahoo to erobb
Default


<%
URL="http://www.SiteToTear.com"
Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP.4.0")
objHTTP.setOption(2) = 13056 'Ignore cert errors
objHTTP.open "GET", URL, False

objHTTP.setRequestHeader "Content-type", "text/html"
objHTTP.send

Response.Write objHTTP.responseText &"<BR>"

%>

Earl Robb
www.jhdesigninc.com





Similar Threads
Thread Thread Starter Forum Replies Last Post
PHP to parse C code ratanatyrupp Pro PHP 1 January 25th, 2008 06:38 AM
PHP Parse error: parse error, unexpected T_STRING geminient PHP How-To 4 August 18th, 2007 02:27 AM
.php files vs .html files pbuongiovanni PHP How-To 2 January 5th, 2006 04:15 AM
Parse text files and save in sub directories malesd VB How-To 2 March 1st, 2004 09:32 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.