I have a mySQL database and I want to query the database and get the name of an MP3 file that is i there and play it.
I think I have some it right so when I send my query to the php page it returns the path to the MP3 file. From there I am not sure since it doesn't play anything.
MC is my HTTPClient
step1:
GetMP3("SELECT mp3 from table where id='" & ID.Text.SubString2(0,6) & "' and plats='" & plats.Text.SubString2(0,7) & "'", mp3)
Step2:
Sub GetMP3(Query As String, TaskId As Int)
Dim reqs As HttpRequest
reqs.InitializePost2("http://www.mysite.com/getmp3.php?id=" & ID.Text.SubString2(0,6) & "&plats=" & plats.Text.SubString2(0,9), Query.GetBytes("UTF8"))
MC.Execute(reqs, TaskId)
End Sub
Step3:
Sub MC_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Dim ress As String
Dim urls As String
ress = Response.GetString("UTF8")
urls=ress
If ress.EndsWith("mp3") Then
mp.LoadLoad(urls)
mp.Play
End If
End Sub
Any suggestions?
I think I have some it right so when I send my query to the php page it returns the path to the MP3 file. From there I am not sure since it doesn't play anything.
MC is my HTTPClient
step1:
GetMP3("SELECT mp3 from table where id='" & ID.Text.SubString2(0,6) & "' and plats='" & plats.Text.SubString2(0,7) & "'", mp3)
Step2:
Sub GetMP3(Query As String, TaskId As Int)
Dim reqs As HttpRequest
reqs.InitializePost2("http://www.mysite.com/getmp3.php?id=" & ID.Text.SubString2(0,6) & "&plats=" & plats.Text.SubString2(0,9), Query.GetBytes("UTF8"))
MC.Execute(reqs, TaskId)
End Sub
Step3:
Sub MC_ResponseSuccess (Response As HttpResponse, TaskId As Int)
Dim ress As String
Dim urls As String
ress = Response.GetString("UTF8")
urls=ress
If ress.EndsWith("mp3") Then
mp.LoadLoad(urls)
mp.Play
End If
End Sub
Any suggestions?