Android Question Php become not work

Adamdam

Active Member
Licensed User
Longtime User
Dear all,
Greetings
I moved to new server, the first one with address like http://abc.com/... the second one https://abc.com/...
All posted php (in my app) stopped.
I normally use following code:
Sub ExecuteRemoteQuery(Query As String, JobName As String)
Dim job As HttpJob
job.Initialize(JobName, Me)
job.PostString("https://abc.com/getdata.php", Query) '' job.PostString("http://abc.com/getdata.php", Query)
End Sub

Sub JobDone(Job As HttpJob)
res = Job.GetString
If Job.Success Then
Log("JobDone Success")
end if

end sub

now this code not work : (i.e. Job.Success not occurred )
I think the problem due to the new server has more security/protection level more than first one.
and I think the problem can be solve by using other library instead of HttpJob (say OkHttpUtils2, but I fail to use it).

Any suggestion, please
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Good time to learn how to use Wait For: [B4X] OkHttpUtils2 with Wait For

1. Your code is wrong. You cannot call Job.GetString if Success isn't true.
2. Check the logs and find the error message.

and I think the problem can be solve by using other library instead of HttpJob (say OkHttpUtils2, but I fail to use it).
HttpJob is part of OkHttpUtils2. You should use it.
 
Upvote 0
Top