PDA

View Full Version : سوال: دریافت کد html یک سایت



Hamishebahar
یک شنبه 15 فروردین 1389, 18:51 عصر
سلام دوستان خسته نباشید...
من چطور میتونم کد html یک سایت رو کامل دریافت کنم؟فقط کد html یعنی اینکه عکسهای اون سایت لود نشه فقط ادرس عکس هاش تو دیده بشه.

ممنونم:قلب:.

hrbaban
یک شنبه 15 فروردین 1389, 19:51 عصر
اگر فايرفاكس استفاده ميكني يه افزونه وجود داره كه ميتوني از اون استفاده كني . امكانات خوبي داره .
https://addons.mozilla.org/en-US/firefox/addon/60/developers/post_install?confirmed=true

mahmoodramzani
یک شنبه 15 فروردین 1389, 19:52 عصر
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Net.Sockets;
using System.Net;
using System.IO;

namespace Networking
{
class Program
{
static void Main(string[] args)
{
string siteName="http://www.google.com";
WebRequest request = WebRequest.Create(siteName);
WebResponse response = request.GetResponse();
Stream stream = response.GetResponseStream();
StreamReader reader=new StreamReader(stream);
while (!reader.EndOfStream)
{
Console.WriteLine(reader.ReadLine());
}
Console.ReadKey();
}
}
}

exlord
دوشنبه 16 فروردین 1389, 08:49 صبح
WebClient web = new WebClient();
string html = web.DownloadString(new Uri("http://www.google.com"));