473,626 Members | 3,276 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_h tml_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 1675
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_h tml_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*******@attgl obal.net
=============== ===

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

Use the curl extension like:

$url = "http://www.test.com";
$myConn = curl_init();
curl_setopt($my Conn, CURLOPT_HEADER, 0);
curl_setopt($my Conn, CURLOPT_RETURNT RANSFER, 1);
curl_setopt($my Conn, CURLOPT_URL, $url);
$www_data = curl_exec($myCo nn);
curl_close($myC onn);

$www_data have the html page code.

or using Zend_Http_Clien t 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.co mwhile 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_h tml_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
13067
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 - ImageName - for processing, or the return data which is done (or not as the case may be) by imagejpeg($img) in the script, after header("Content-type: image/jpeg"). Any insights would be most welcome, especially debugging techniques and a pointer to...
7
14648
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
2085
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 question here. The problem is with an email that gets sent from the system. In a nutshell, it's an HTML format email that is choking on the string that is returned form this function that is added to the email's body:
8
2341
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 controls the rendered names are changed and I appear to be limited in what javascript events I can fire. I also can not seem to figure out how to setup a onsubmit() event. With standard HTML I can setup any javascript event I want and the names...
0
8269
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8203
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8642
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8368
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
7203
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6125
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5576
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
1815
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1515
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.