473,467 Members | 1,307 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

how to retrieve data from given websites

Hi

I want to Extracet(retrieve) data from some of websites and the retrieved
data has to be saved in excel or.csv files.
I need to develop this in ASP.net(using C#.net Vs 2003).

Can any one tell me the idea of how to get data from websites?

Thanx in advance
Yoshitha
Jun 3 '06 #1
8 7184
zEE

let say u have a website
string url="http://www.hotmail.com";

now u can use MSXML dll

XMLHTTP ObjHttp = new XMLHTTP();
//Connecting to site
ObjHttp.open("post",url,false,null, null);
//Sending parameters (may be u dont required it)
ObjHttp.send("case="+TicketNum");

if (ObjHttp.status.ToString() == "200") //successfull response
{
return ObjHttp.responseText;
}

"ObjHttp.responseText" this will be string having html of the page
u need to parse it using Regex to get ur desired data

Hope it will help u

Jun 3 '06 #2
Yoshitha,
Check the documentation for the WebClient class. This is a simplified
wrapper over HttpWebRequest / Response. It has four basic methods. There's
plenty of good sample code in the MSDN documentation.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"Yoshitha" wrote:
Hi

I want to Extracet(retrieve) data from some of websites and the retrieved
data has to be saved in excel or.csv files.
I need to develop this in ASP.net(using C#.net Vs 2003).

Can any one tell me the idea of how to get data from websites?

Thanx in advance
Yoshitha

Jun 3 '06 #3
hi
is it possible to retrieve data from other websites uing XTerm, XPath
Technology of ASP.net with regular Expressions.

"zEE" <ha*********@gmail.com> wrote in message
news:11**********************@h76g2000cwa.googlegr oups.com...

let say u have a website
string url="http://www.hotmail.com";

now u can use MSXML dll

XMLHTTP ObjHttp = new XMLHTTP();
//Connecting to site
ObjHttp.open("post",url,false,null, null);
//Sending parameters (may be u dont required it)
ObjHttp.send("case="+TicketNum");

if (ObjHttp.status.ToString() == "200") //successfull response
{
return ObjHttp.responseText;
}

"ObjHttp.responseText" this will be string having html of the page
u need to parse it using Regex to get ur desired data

Hope it will help u

Jun 5 '06 #4
zEE
all depends on ur needs.. what u really want to achieve from ur desired
website

Jun 5 '06 #5
I need to get contact details of doctors, dentisit and so on from a site.
and the gathered details has to be stored in .xle or .csv file.
i need to gather data from this site
http://www.mydr.com.au/hcp/hcp.asp?mode=Pharmacist
http://www.mydr.com.au/hcp/hcp.asp?mode=Specialist
like wise i have some more urls.
the above links gives you teh search page in that we need to enter some
names for eg(AD) in surname text box and click on search button then it will
display some hyperlnks and when we click on hyperlink it will give contact
details.
and i need to get those details and store them into .xls or csv files.
here i used AD but we need to search with all posible combinations from A to
Z
and need to retrieve contact details of doctors etc.

that is my requirement
i need to achieve this using any method.

one more thing, for exmple if the page contains contact details directly of
all teh doctors and if that page is having paging(page 1,2...) if i want to
get data from all these pages how can be this achieved can you tell me.

REgards
Yoshitha

"zEE" <ha*********@gmail.com> wrote in message
news:11********************@y43g2000cwc.googlegrou ps.com...
all depends on ur needs.. what u really want to achieve from ur desired
website

Jun 5 '06 #6
mmmm screen scraping. Do you have permission to use the information
you'll be taking from this site?

Yoshitha wrote:
I need to get contact details of doctors, dentisit and so on from a site.
and the gathered details has to be stored in .xle or .csv file.
i need to gather data from this site
http://www.mydr.com.au/hcp/hcp.asp?mode=Pharmacist
http://www.mydr.com.au/hcp/hcp.asp?mode=Specialist
like wise i have some more urls.
the above links gives you teh search page in that we need to enter some
names for eg(AD) in surname text box and click on search button then it will
display some hyperlnks and when we click on hyperlink it will give contact
details.
and i need to get those details and store them into .xls or csv files.
here i used AD but we need to search with all posible combinations from A to
Z
and need to retrieve contact details of doctors etc.

that is my requirement
i need to achieve this using any method.

one more thing, for exmple if the page contains contact details directly of
all teh doctors and if that page is having paging(page 1,2...) if i want to
get data from all these pages how can be this achieved can you tell me.

REgards
Yoshitha

"zEE" <ha*********@gmail.com> wrote in message
news:11********************@y43g2000cwc.googlegrou ps.com...
all depends on ur needs.. what u really want to achieve from ur desired
website


Jun 5 '06 #7
yes we do have permission
we can use either the urls i mentioned or can use yellowpages also
http://www.yellowpages.com.au/search...dingCode=23051
&businessType=dentist&stateId=9.

can you tell me how to get data from yellow pages link?
"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:#o**************@TK2MSFTNGP03.phx.gbl...
mmmm screen scraping. Do you have permission to use the information
you'll be taking from this site?

Yoshitha wrote:
I need to get contact details of doctors, dentisit and so on from a site. and the gathered details has to be stored in .xle or .csv file.
i need to gather data from this site
http://www.mydr.com.au/hcp/hcp.asp?mode=Pharmacist
http://www.mydr.com.au/hcp/hcp.asp?mode=Specialist
like wise i have some more urls.
the above links gives you teh search page in that we need to enter some
names for eg(AD) in surname text box and click on search button then it will display some hyperlnks and when we click on hyperlink it will give contact details.
and i need to get those details and store them into .xls or csv files.
here i used AD but we need to search with all posible combinations from A to Z
and need to retrieve contact details of doctors etc.

that is my requirement
i need to achieve this using any method.

one more thing, for exmple if the page contains contact details directly of all teh doctors and if that page is having paging(page 1,2...) if i want to get data from all these pages how can be this achieved can you tell me.

REgards
Yoshitha

"zEE" <ha*********@gmail.com> wrote in message
news:11********************@y43g2000cwc.googlegrou ps.com...
all depends on ur needs.. what u really want to achieve from ur desired
website


Jun 5 '06 #8
in VB's myobject you can find urldownloadtofile
Must be present in c# as well imo search..
It's the easiest way.

"Yoshitha" <jy********@nannacomputers.com> schreef in bericht
news:%2****************@TK2MSFTNGP02.phx.gbl...
yes we do have permission
we can use either the urls i mentioned or can use yellowpages also
http://www.yellowpages.com.au/search...dingCode=23051
&businessType=dentist&stateId=9.

can you tell me how to get data from yellow pages link?
"Ray Booysen" <rj***********@rjb.za.net> wrote in message
news:#o**************@TK2MSFTNGP03.phx.gbl...
mmmm screen scraping. Do you have permission to use the information
you'll be taking from this site?

Yoshitha wrote:
> I need to get contact details of doctors, dentisit and so on from a site. > and the gathered details has to be stored in .xle or .csv file.
> i need to gather data from this site
> http://www.mydr.com.au/hcp/hcp.asp?mode=Pharmacist
> http://www.mydr.com.au/hcp/hcp.asp?mode=Specialist
> like wise i have some more urls.
> the above links gives you teh search page in that we need to enter
> some
> names for eg(AD) in surname text box and click on search button then it will > display some hyperlnks and when we click on hyperlink it will give contact > details.
> and i need to get those details and store them into .xls or csv files.
> here i used AD but we need to search with all posible combinations from A to > Z
> and need to retrieve contact details of doctors etc.
>
> that is my requirement
> i need to achieve this using any method.
>
> one more thing, for exmple if the page contains contact details
> directly of > all teh doctors and if that page is having paging(page 1,2...) if i
> want to > get data from all these pages how can be this achieved can you tell me.
>
> REgards
> Yoshitha
>
>
>
>
>
> "zEE" <ha*********@gmail.com> wrote in message
> news:11********************@y43g2000cwc.googlegrou ps.com...
>> all depends on ur needs.. what u really want to achieve from ur
>> desired
>> website
>>
>
>


Jun 5 '06 #9

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

Similar topics

4
by: Peter Kaptein | last post by:
I am building websites using Databases and COM for 3tier apps. Currently I have to tell my COM object where the database is located either 1) Hardcoded in the DLL 2) Via my ASP call How do...
5
by: Vanessa | last post by:
I have a question, is that any other way to retrieve data from another webpage besides using XML object? Because I am using XML object now but give me so much problems. If I used...
2
by: will | last post by:
hi, my ISP doesn't have webmail service, so i use TcpClient & Friends to issue POP3 commands to retrieve emails, store data on a website, and use that website to view emails. it all works...
3
by: Asus | last post by:
Hello, I'm new to Web Services. I'm trying to develop a Web Service that retrieves some data out of a database and sends them to the client as a DataSet when a method is invoked. My question...
0
by: gurusshetty | last post by:
Hi I have a MS Sql table 'supplier' contains more than 100000 records. When I try to open supplier entry form it takes lot of time to fill datatable (almost between 10 to 15 seconds). I am using...
0
by: geeteshss | last post by:
Dear All, If i have two master pages in which for eg i have got a label named code and a textbox for it to insert the data and it is stored in the database ...and i have got another page in which i...
0
by: ehasas | last post by:
Hello, I am trying to retrieve Xpath from the XML file for a given text value of node. I am doing this in VB and using "Microsoft XML, v4.0" library for XML parsing. How to find xpath from the...
1
by: ASPLearner | last post by:
Hi, I am trying to retrieve contect from other website and save it to database. Anyone can help? For Example: I want my script go to a webpage and retrieve someone's first name, last name &...
4
by: Dave | last post by:
I have a global.asax file with Application_Start defined and create some static data there and in another module used in the asp.net application and I realize that static data is shared amongst...
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.