Hi,
I am having a problem calling a small PHP code snippet with HttpJob.
The following manually entered URL works as anticipated.
http://www.martinsrubber.com/LocUser.php?Lon=-1.5192225&Lat=50.9278771&Imei=358032050172122
LocUser.php is a mature well used snippet of code known to work for the last 3 years.
The code which fails is as follows...
Sub Location_LocationChanged (Longitude As Double, Latitude As Double, Altitude As Double, Accuracy As Float, Bearing As Float, Provider As String, Speed As Float, time As Long)
Dim job2 As HttpJob
Dim sPHP As String
sPHP = "?Lon=" & Longitude & "&Lat=" & Latitude & "&Imei=" & cImei
' This line gives the sPHP string
'?Lon=-1.5192225&Lat=50.9278771&Imei=358032050172122
job2.Initialize("Job2", Me)
job2.PostString("http://www.martinsrubber.com/LocUser.php", sPHP)
Log(sPHP)
End Sub
The callback procedure JobDone gives the following error message..
JobName = Job2, Success = true //Job obviously runs ok but PHP Item String failing????
<br />
<b>Notice</b>: Undefined index: Lat in <b>E:\Domains\m\martinsrubber.com\user\htdocs\LocUser.php</b> on line <b>9</b><br />
<br />
<b>Notice</b>: Undefined index: Lon in <b>E:\Domains\m\martinsrubber.com\user\htdocs\LocUser.php</b> on line <b>10</b><br />
<br />
<b>Notice</b>: Undefined index: Imei in <b>E:\Domains\m\martinsrubber.com\user\htdocs\LocUser.php</b> on line <b>11</b><br />
Is job2.PostString("http://www.martinsrubber.com/LocUser.php", sPHP) Incorrect anywhere??
I always assume things are my fault, so if it's very obvious what I'm doing wrong, please don't spare my blushes..
Best Wishes
Tony Hunt
I am having a problem calling a small PHP code snippet with HttpJob.
The following manually entered URL works as anticipated.
http://www.martinsrubber.com/LocUser.php?Lon=-1.5192225&Lat=50.9278771&Imei=358032050172122
LocUser.php is a mature well used snippet of code known to work for the last 3 years.
The code which fails is as follows...
Sub Location_LocationChanged (Longitude As Double, Latitude As Double, Altitude As Double, Accuracy As Float, Bearing As Float, Provider As String, Speed As Float, time As Long)
Dim job2 As HttpJob
Dim sPHP As String
sPHP = "?Lon=" & Longitude & "&Lat=" & Latitude & "&Imei=" & cImei
' This line gives the sPHP string
'?Lon=-1.5192225&Lat=50.9278771&Imei=358032050172122
job2.Initialize("Job2", Me)
job2.PostString("http://www.martinsrubber.com/LocUser.php", sPHP)
Log(sPHP)
End Sub
The callback procedure JobDone gives the following error message..
JobName = Job2, Success = true //Job obviously runs ok but PHP Item String failing????
<br />
<b>Notice</b>: Undefined index: Lat in <b>E:\Domains\m\martinsrubber.com\user\htdocs\LocUser.php</b> on line <b>9</b><br />
<br />
<b>Notice</b>: Undefined index: Lon in <b>E:\Domains\m\martinsrubber.com\user\htdocs\LocUser.php</b> on line <b>10</b><br />
<br />
<b>Notice</b>: Undefined index: Imei in <b>E:\Domains\m\martinsrubber.com\user\htdocs\LocUser.php</b> on line <b>11</b><br />
Is job2.PostString("http://www.martinsrubber.com/LocUser.php", sPHP) Incorrect anywhere??
I always assume things are my fault, so if it's very obvious what I'm doing wrong, please don't spare my blushes..
Best Wishes
Tony Hunt