473,659 Members | 3,553 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to retrieve data from given websites

Hi

I want to Extracet(retrie ve) 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 7195
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("p ost",url,false, null, null);
//Sending parameters (may be u dont required it)
ObjHttp.send("c ase="+TicketNum ");

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

"ObjHttp.respon seText" 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(retrie ve) 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*********@gm ail.com> wrote in message
news:11******** **************@ h76g2000cwa.goo glegroups.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("p ost",url,false, null, null);
//Sending parameters (may be u dont required it)
ObjHttp.send("c ase="+TicketNum ");

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

"ObjHttp.respon seText" 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*********@gm ail.com> wrote in message
news:11******** ************@y4 3g2000cwc.googl egroups.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*********@gm ail.com> wrote in message
news:11******** ************@y4 3g2000cwc.googl egroups.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=d entist&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******** ******@TK2MSFTN GP03.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*********@gm ail.com> wrote in message
news:11******** ************@y4 3g2000cwc.googl egroups.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 urldownloadtofi le
Must be present in c# as well imo search..
It's the easiest way.

"Yoshitha" <jy********@nan nacomputers.com > schreef in bericht
news:%2******** ********@TK2MSF TNGP02.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=d entist&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******** ******@TK2MSFTN GP03.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*********@gm ail.com> wrote in message
> news:11******** ************@y4 3g2000cwc.googl egroups.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
4222
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 I retrieve the dir where my DLL is located? In the VB6 runtime environment "CurDir" does it for the runtime-situation Once I go "DLL" CurDir is retrieving the current active dir, that could be anything.
5
7078
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 MSXML2.ServerXMLHTTP object, it gives me time out error: msxml3.dll error '80072ee2' The operation timed out If I used Microsoft.XMLHTTP object, it will hang IE!
2
2852
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 fine with text-only emails, but it doesn't store attachments correctly. all attachments are displayed 'raw'. how do i deal with this problem?
3
2179
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 is: Is it possible to run another method on the Web Service automatically to refresh the data? That means the Web Service should interact as a Windows Service after a certain amount of time it should retrieve the data and stores them locally, and...
0
840
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 Visual Studio 2005 (C# language). to fill datatable supplier the code which i have used is given below. this.supplierTableAdapter.Fill(this.ds.supplier). Even it takes time to find a particular row from my datatable supplier. Code is given...
0
1082
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 have got a label named code same from the previous one but here i dont need to fill in the data it should get the data from the previous page like a dropdownlist. how should i do it ...... i know that it is against the norms of the forum but i...
0
1156
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 xml data if we have a text value of node in VB? Also how can we find the Root Node of any XML data in VB? Please revet. Thanks in anticipation -ehasas
1
1548
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 & address automatically. After I get the details, I want to save to my database. Can I do something like this? Thanks in advance!
4
4520
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 child apps of an IIS application and can be used by multiple users during the application life cycle and for multiple page loads for the same or different page under a root application. What I don't understand and need to know is whether that...
0
8428
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
8337
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
8748
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
8531
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
7359
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
6181
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
5650
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();...
0
4175
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
1739
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.