Audiovox P965 Datový list Strana 159

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 280
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 158
Api php template
156
echo "</table>";
echo "<br />Debug:";
echo "<br />";
print_r($ARRAY);
$API->disconnect();
}
?>
References
[1] http:/ / wiki. mikrotik. com/ wiki/ API_PHP_class
[2] http:/ / forum. mikrotik. com/ viewtopic. php?f=9& t=50176
[3] http:/ / www. bosrup. com/ web/ overlib/ ?Download
API in VB dot NET
This is VB.NET class for connecting and working with Mikrotik API. It will give you basic connectivity so you can
log in and send and receive commands.
Class
Public Class Mikrotik
Dim tcpStream As IO.Stream
Dim tcpCon As New Net.Sockets.TcpClient
Public Sub New(ByVal ipOrDns As String, Optional ByVal port As Integer = -1)
Dim ips = Net.Dns.GetHostEntry(ipOrDns)
tcpCon.Connect(ips.AddressList(0), If(port = -1, 8728, port))
tcpStream = tcpCon.GetStream()
End Sub
Public Sub New(ByVal endP As System.Net.IPEndPoint)
tcpCon.Connect(endP)
tcpStream = tcpCon.GetStream()
End Sub
Public Sub Close()
tcpStream.Close()
tcpCon.Close()
End Sub
Public Function Login(ByVal user As String, ByVal pass As String) As Boolean
Send("/login", True)
Dim hash = Read()(0).Split(New String() {"ret="}, StringSplitOptions.None)(1)
Zobrazit stránku 158
1 2 ... 154 155 156 157 158 159 160 161 162 163 164 ... 279 280

Komentáře k této Příručce

Žádné komentáře