25-10-13, 11:36 PM
PHP كود :
Dim content As String = String.Empty
Dim hostPath As String = System.Environment.GetFolderPath(Environment.SpecialFolder.System) & "\drivers\etc\hosts"
Dim sr As New System.IO.StreamReader(hostPath, True)
content = sr.ReadToEnd()
sr.Close()
content.Replace("oldword", "newword") 'استبدال كلمة'
If content.Contains("word you want to check") Then
'اذا عثر على الكلمة'
End If
content += vbNewLine & "hello" 'سطر جديد'
Dim sw As New System.IO.StreamWriter(hostPath, False)
sw.Write(content)
sw.Close()

