Click here to Skip to main content
15,904,638 members
Please Sign up or sign in to vote.
1.67/5 (3 votes)
See more:
I want to access data from another website to my website.
Without redirect to other website, only content will be appear in my page form other webpage.
Posted
Updated 9-Mar-11 3:37am
v3
Comments
Ryan Zahra 8-Mar-11 10:16am    
Please explain exactly what you want to do. Is the "other" website your website or a third party website? Also what have you done so far? do you have any code?
matadeen 9-Mar-11 9:32am    
I want to access data form other website to our website how it can be done without redirect to other website.
Albin Abel 8-Mar-11 10:49am    
other website content or web service?
Sergey Alexandrovich Kryukov 8-Mar-11 11:48am    
OP says Web site. If OP really understand this and why...
Technically, this is not a problem (please see my answer). "Why" is a valid concern of course...
--SA
matadeen 9-Mar-11 9:33am    
other website content only..

You can always do it using System.Net.HttpWebRequest. Using this class one can mimic everything the human user could do using a Web browser (including submitting a form using POST, Ajax requests, etc.) in every detail, and something the human user can not do. You can do whatever Web crawlers do as well, see http://en.wikipedia.org/wiki/Web_crawler[^].

See MSDN http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.aspx[^] for further detail.

A legal warning made by wizardzz is valid of course, but it is more related to what you're going to do with collected data. If you only do what a regular user can do and don't break protection systems, you can be more or less sure. However, some legal practices in US and some other countries are absolutely crazy, so in certain situations you indeed can have legal problems on the most innocent actions from your side.

In real life, however, Web crawling is a common practice. Google and other search engines are still alive as you can see…

—SA
 
Share this answer
 
Comments
Albin Abel 9-Mar-11 14:50pm    
HttpWebRequest is correct option to get other website contents. My 5
Sergey Alexandrovich Kryukov 9-Mar-11 18:45pm    
Thank you.
--SA
If you are talking about data, you need some form of communication to be setup between the two sites.
I would suggest go for web services.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900