Android Question PostString

walterf25

Expert
Licensed User
Longtime User
Hi all,

I am trying to use PostString to return info from a php script.

If I use the browser it works, this is the link http://scanplate.dyndns.org/cgi-bin/readplate.php?plate=car2.jpg

In my code it does not.

Dim job2 As HttpJob
job2.Initialize("Job2", Me)
job2.PostString("http://scanplate.dyndns.org/cgi-bin/readplate.php", "plate=car2.jpg")

anyone know what I am doing wrong?

Thanks
When you say it doesn't work, do you get any errors, where is the code where the answer is returned?

Walter
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
Yes, I get error 500

It is in the JobDone subroutine.

Thanks
the following works for me
HTTP PostString:
    job.Initialize("picture", Me)
    job.PostString("http://scanplate.dyndns.org/cgi-bin/readplate.php?plate=car2.jpg", Null)
    wait for (job) JobDone(j As HttpJob)
    If j.Success Then
    Log("response: " & j.GetString)
    Else
    Log("Error: " & j.ErrorMessage)   
    End If

I receive the following response:
response: <pre>plate0: 1 results
- LTM378 confidence: 90.0636
></pre>

Walter
 
Upvote 0
Top