473,388 Members | 1,425 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

reading html code form outer sites

HC
Hello!

1) How to read html code from www.test.com while having your own site on
www.homesite.com . I have read before, that many web pages blocks access to
read such html code from outer sites, if so how can I do it having 100% of
effectivity?

2) How can I analyse (after reading and saving into $www_test_com_html_code
variable)? I would like to get the right and most interesting for me
information which are placed in html tags - will bbcode good and right for
it?

Please give me the examples
Please help
Thank you in advance for any help
heeyo

Nov 5 '08 #1
2 1664
HC wrote:
Hello!

1) How to read html code from www.test.com while having your own site on
www.homesite.com . I have read before, that many web pages blocks access
to read such html code from outer sites, if so how can I do it having
100% of effectivity?
You can't. The reason web pages block such access is just to prevent
such operations.

If you have a valid reason to scrape their site, you should be able to
get permission from the company to do so. It is their site (and
bandwidth) you are using, after all.
2) How can I analyse (after reading and saving into
$www_test_com_html_code variable)? I would like to get the right and
most interesting for me information which are placed in html tags - will
bbcode good and right for it?

Please give me the examples
Please help
Thank you in advance for any help
heeyo

Parsing HTML is not easy. bbcode won't do it. If it's well-formed, you
can use the DOM Document classes. Otherwise, you'll need to write a lot
of code to parse the information out yourself.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
js*******@attglobal.net
==================

Nov 5 '08 #2
Yes, we can ;-)

Use the curl extension like:

$url = "http://www.test.com";
$myConn = curl_init();
curl_setopt($myConn, CURLOPT_HEADER, 0);
curl_setopt($myConn, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($myConn, CURLOPT_URL, $url);
$www_data = curl_exec($myConn);
curl_close($myConn);

$www_data have the html page code.

or using Zend_Http_Client functionality from Zend Framework.

--
Atentament / Kind Regards

Ālex Corretgé
Serveis Informātics Corretgé.com SLU
http://corretge.cat/

LinkedIn: http://www.linkedin.com/in/corretge

On 5 Nov, 22:03, "HC" <halinapies...@op.plwrote:
Hello!

1) How to read html code fromwww.test.comwhile having your own site onwww..homesite.com. I have read before, that many web pages blocks access to
read such html code from outer sites, if so how can I do it having 100% of
effectivity?

2) How can I analyse (after reading and saving into $www_test_com_html_code
variable)? I would like to get the right and most interesting for me
information which are placed in html tags - will bbcode good and right for
it?

Please give me the examples
Please help
Thank you in advance for any help
heeyo
Nov 6 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Gregory | last post by:
Hello, I'm trying to do the above in order to process an image and return the result to an html image control. It fails and my key suspects are either the variable that I'm passing in -...
7
by: Santah | last post by:
hi I'm new to C++ and I'm currently working on Visual C++ 6.0 I'm trying to open a text file, and read some data from it part of the text file looks like this: --------
1
by: bidllc | last post by:
I'm working on a minor bug from an open source bug tracking system (bugtracket.net). It's a great app, but I don't want to bother the creator any more than I have to, so I thought I'd pose the...
8
by: =?Utf-8?B?U2hhd24gUmFtaXJleg==?= | last post by:
I am coming at the world from the standpoint of a veteran ASP Classic developer. I am not clear on the advantages of using the ASP.NET control over standard HTML control. With the ASP.NET...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.