delphi4arab منتديات دلفي للعرب
فحص الروابط - نسخة قابلة للطباعة

+- delphi4arab منتديات دلفي للعرب (https://delphi4arab.net/forum)
+-- قسم : منتديات دلفي للعرب التعليمية (https://delphi4arab.net/forum/forumdisplay.php?fid=3)
+--- قسم : سؤال و جواب حول دلفي (https://delphi4arab.net/forum/forumdisplay.php?fid=15)
+--- الموضوع : فحص الروابط (/showthread.php?tid=10404)



فحص الروابط - samir28 - 25-08-2019

كيف يتم فحص رابط  ؟  و معرفة  : 
تاريخ الانشاء - تاريخ الانتهاء - عدد الاقصى للمتصلين - عدد المتصلين ....
كما هو في الصورة .

[img][صورة: p_1332mpdrq1.png][/img]


RE: فحص الروابط - samir28 - 26-08-2019

وجدت الكود و لكن بلغة vb
هل من احد يمكنه مساعدتي في تحويل الكود .


RE: فحص الروابط - salah07230 - 26-08-2019

ممكن رابط صفحة الفحص


RE: فحص الروابط - samir28 - 26-08-2019

بارك الله بك اخي صلاح
كود :
Imports System.Net Imports System.IO Imports System.Text.RegularExpressions Imports System.Text Imports System.Threading Public Class Form1 Private cookies As CookieContainer = New CookieContainer Dim client As New WebClient Public PIC As String = """large"":""(.*?)""" Dim nom As String = """first"":""(.*?)"",""last"":""(.*?)""" Dim Pitter As String = """status"":""(.*?)""|""username"":""(.*?)""|""password"":""(.*?)""|""max_connections"":""(.*?)""|""active_cons"":""(.*?)""|""allowed_output_formats"":""(.*?)""|""max_connections"":""(.*?)""|""server_info"":""(.*?)""|""categories"":""(.*?)""|""dob"":""(.*?)""" Public Sub New() InitializeComponent() Control.CheckForIllegalCrossThreadCalls = False End Sub Public Sub GetID() Try Dim Code As String Code = TextBox1.Text Code = Code.Replace("get.php", "panel_api.php") Dim request As HttpWebRequest = DirectCast(WebRequest.Create(Code), HttpWebRequest) request.Method = "GET" request.CookieContainer = Me.cookies request.UserAgent = "Mozilla/5.0 (Windows NT 6.1; rv:47.0) Gecko/20100101 Firefox/47.0" request.ContentType = "application/x-www-form-urlencoded" Dim reader As New StreamReader(request.GetResponse.GetResponseStream, Encoding.UTF8) Dim input As String = reader.ReadToEnd Dim I As String = """dob"":""(.*?)""" For Each p As ListViewItem In LV1.Items Dim F As ListView = LV1 Dim match As Match = Regex.Match(input, Pitter.Split("|")(p.Index), RegexOptions.IgnoreCase) p.SubItems.Add(match.Groups(1).Value.Trim) Next Catch ex As Exception End Try End Sub Public Sub ResetItems() On Error Resume Next LV1.Items.Clear() LV1.Items.Add("Status") LV1.Items.Add("Username") LV1.Items.Add("Password") LV1.Items.Add("Maximum Connections") LV1.Items.Add("Active Connections") End Sub Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Application.DoEvents() ResetItems() Dim trakktour As New Thread(AddressOf GetID) trakktour.IsBackground = True trakktour.Start() End Sub End Class
الرابط لتحميل الملف
https://mega.nz/#!9FdznCjT!SQmsbfxjD6Rm2MNI-7-CymgZAPJFq4aELdX2VayaEeY


RE: فحص الروابط - samir28 - 28-08-2019

فقط هذا الجزء من الكود و تحويله الى function 
PHP كود :
Public Sub GetID()
        Try
            Dim Code As String
            Code 
= TextBox1.Text
            Code 
= Code.Replace("get.php", "panel_api.php")

            Dim request As HttpWebRequest = DirectCast(WebRequest.Create(Code), HttpWebRequest)
            request.Method = "GET"
            request.CookieContainer = Me.cookies
            request
.UserAgent = "Mozilla/5.0 (Windows NT 6.1; rv:47.0) Gecko/20100101 Firefox/47.0"
            request.ContentType = "application/x-www-form-urlencoded"
            Dim reader As New StreamReader(request.GetResponse.GetResponseStream, Encoding.UTF8)
            Dim input As String = reader.ReadToEnd
            Dim I 
As String = """dob"":""(.*?)"""
            For Each p As ListViewItem In LV1.Items
                Dim F 
As ListView = LV1
                Dim 
match As Match = Regex.Match(input, Pitter.Split("|")(p.Index), RegexOptions.IgnoreCase)
                p.SubItems.Add(match.Groups(1).Value.Trim)

            Next

        
Catch ex As Exception

        End 
Try
    End Sub 



RE: فحص الروابط - onexite - 29-08-2019

يقوم باستبدال الصفحة "get.php", "panel_api.php"
ضع مثال ( رابط ) للفحص


RE: فحص الروابط - Delphi4Us - 29-08-2019

الاخ سمير سألني هذا السؤال في قسم دلفي بموقع فيجوال بيسك للعرب
والذي وجدت نفسي فيه مسؤول عن قسم دلفي رغم ظروفي الكثيرة وقلة الوقت بعد ان طالبتهم باكثر من منشور الانتقال لدلفي بدل الدوت نت والفيجوال بيسك 6 فيما يخص تطبيقات سطح المكتب
ولانني لا علاقة لي ببرمجة الويب ولا افهمها طلبت منه عرض المثال هنا .


RE: فحص الروابط - delphi17 - 29-08-2019

حسب علمي يوجد مكتبة مخصصة لذلك في لازورس فري بسكال إذا كان هذا صحيح اكيذ يوجد هذا في الدلفي ايضا


RE: فحص الروابط - samir28 - 30-08-2019

شكرا على الردود
يوجد بالدلفي الدالة
TregEx.Match
Regular Expressions