03-10-13, 09:01 PM
(03-10-13, 08:16 PM)Abdullah0991 كتب : اذا كنت تريد التحقق من وجود الرابط فقط (يعني ممكن يكون الملف محذوف):
PHP كود :
Try
Dim req As HttpWebRequest = HttpWebRequest.Create("http://www.4shared.com/get/MJzSS3Mi/__1.html")
Dim res As HttpWebResponse = req.GetResponse
MsgBox("موجود")
res.Close()
Catch ex As Exception
MsgBox("غير موجود")
End Try
احسنت استاذي
احب اضيف هذا الكود ليقوم بفحص الملف (موجود - او غير موجود)
^ صالح لموقع 4shared فقط
PHP كود :
Try
Dim hWeb As New HtmlAgilityPack.HtmlWeb()
Dim doc As HtmlAgilityPack.HtmlDocument = hWeb.Load(TextBox1.Text)
Dim node As HtmlAgilityPack.HtmlNode = doc.DocumentNode.SelectSingleNode("//a[@id='btnLink']")
If node IsNot Nothing Then
Panellabel.Text = "File Founded!!"
Panel1.BackColor = Color.Green
Else
Panellabel.Text = "File Not Found!!"
Panel1.BackColor = Color.Red
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
End Sub

