need help recoding a VB6 script to php for an API

I’ve established the following two commands will send a line of text to the Lumen LED Matrix Controller Any ideas how Net_init and Net_SendText can be coded in PHP/Javascript??

The API shows the format for the commands as…
CP5200_Net_Init(dwIPAddr, IPPort.text, dwIDCode, m_nTimeout)
CP5200_Net_SendText(m_cmbID.ListIndex + 1, WndNo.ListIndex, text, RGB(255, 0, 0), 16, 3, 0, 3, 5)

I’ve stripped down the VB6 file and hardcoded the ip address for the sign in the office. Ip address and Passcode have to be in DWORD/Long format so used a converter to get the values (

#CP5200_Net_Init(1354859800, 6500, -1, 2000)
#text = “hello”
#CP5200_Net_SendText(1, 0, text, RGB(255, 0, 0), 16, 3, 0, 3, 5)

The Final VB code looks like this……


Private Declare Function CP5200_Net_Init Lib “CP5200.dll” (ByVal dwIP As Long, ByVal nIPPort As Long, ByVal #dwIDCode As Long, ByVal nTimeout As Long) As Long

Private Declare Function CP5200_Net_SendText Lib “CP5200.dll” (ByVal nCardID As Long, ByVal nWndNo As #Long, ByVal pText As String, ByVal crColor As Long, ByVal nFontSize As Long, ByVal nSpeed As Long, ByVal nEffect #As Long, ByVal nStayTime As Long, ByVal nAlignment As Long) As Long

#Private Sub btnSendText_Click()
# Dim ret As Integer
#Dim text As String
# text = m_edtText1.text
#Call CP5200_Net_Init(1354859800, 6500, -1, 2000)
# nRet = 1
# ret = CP5200_Net_SendText(1, 0, text, RGB(255, 0, 0), 16, 3, 0, 3, 5)

 #       If ret >= 0 Then
   #         MsgBox ("Success")
   #     Else
            MsgBox ("Fail")
 #       End If

#End Sub

This is a call for help from a friend, i said i would do some digging but am stumped as to where to even start.

Hello were you able to sort out the problem? Even I want to record recoding a VB6 script to php so please help me…

Sponsor our Newsletter | Privacy Policy | Terms of Service