yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Development and Hacking General] Tigggger:
I have the file saved in the trackme directory as signature.php

To use call it with the userid you want the map for and place it in the image tags of your signature

eg

http://www.domain.com/trackme/signature.php?ID=123

You can use

<?php
$ID = $_GET['ID'];
if ( $ID == NULL ) { exit; }
require_once('config.php');
$conn = mysql_connect($DBIP, $DBUSER, $DBPASS);
mysql_select_db($DBNAME, $conn);
$query = "Select * FROM positions WHERE FK_Users_ID = '$ID' ORDER BY ID DESC LIMIT 1";
$result = mysql_query($query,$conn);
while($rows=mysql_fetch_array($result)){
$lat = round($rows[4],2);
$lon = round($rows[5],2);
}
$url = "http://maps.google.com/staticmap?center=" . $lat . "," . $lon . "&zoom=10&size=450x150&maptype=mobile&markers=" . $lat . "," . $lon . ",green&key=" . $googleapikey . "";
header("Location: $url");
?>
[Windows Mobile Development and Hacking General] y0himba:
http://www.domain.com/trackme/signature.php?ID=123

ID=123 is that string to be replaced with anything or use it as-is? Sorry, I am a n00b.
[Windows Mobile Development and Hacking General] Tigggger:
In your database, in the 'users' table, is an ID for each person, that is what you need to use.

That said I see my sig has vanished, working ok before and I can still see it if I type the URL in my browser, and if I go into my control panel, view signature it's still there. Need to investigate what's happening. Just clicked preview post and it's back again, weird :mad:

I do have a plan b, but that involves creating a real jpg image each time you update, but obviously that's not an ideal solution.
[Windows Mobile Development and Hacking General] Tigggger:
OK it vanished again, so here is plan b, not quite as easy as it requires 2 edits in the requests.php file

Top of requests.php looks like this...

<?php

require_once("config.php");

change it to

<?php
function save_image($inPath,$outPath) {
$in= fopen($inPath, "rb");
$out= fopen($outPath, "wb");
while ($chunk = fread($in,8192)) { fwrite($out, $chunk, 8192); }
fclose($in);
fclose($out);
}

require_once("config.php");

then around line 262 it has this bit

$batterystatus = urldecode($_GET["bs"]);
$uploadss = urldecode($_GET["upss"]);

$iconid='null';

Change it to...

$batterystatus = urldecode($_GET["bs"]);
$uploadss = urldecode($_GET["upss"]);
$url = "http://maps.google.com/staticmap?center=" . $lat . "," . $long . "&zoom=10&size=450x150&maptype=mobile&markers=" . $lat . "," . $long . ",green&key=" . $googleapikey . "";
$save_pic = $userid;
$save_pic.= ".gif";
save_image($url,$save_pic);

$iconid='null';

Whenever trackme sends an update to your server it will create a new picture in the format username.jpg, my username is 222 so in my signature profile i just use

http://www.domain.com/trackme/222.gif

Hopefully it's sorted now, and the changes can be built into the next update (as an option)
[Windows Mobile Development and Hacking General] y0himba:
The original seems to be working fine with me. I think it was a temporary forum glitch?
[Windows Mobile Development and Hacking General] Dtrieb:
Can you change all and upload this "new" version?
[Windows Mobile Development and Hacking General] krofeta:
I notice "Last update" time stamp on genereting image!? This is something new in your code?
[Windows Mobile Development and Hacking General] krofeta:
When I press hotspot in web viewer, I got the wrong data on the cloud for speed (app. 100% higher then real, km/h) and I got no data for altitude.

Any solution for that?
[Windows Mobile Development and Hacking General] Tigggger:
Yeah I was messing with it after I posted last, here's the code...

$batterystatus = urldecode($_GET["bs"]);
$uploadss = urldecode($_GET["upss"]);

$url = "http://maps.google.com/staticmap?center=" . $lat . "," . $long . "&zoom=10&size=450x150&maptype=mobile&markers=" . $lat . "," . $long . ",green&key=" . $googleapikey . "";
$temp_pic = $userid;
$temp_pic.= time();
$temp_pic.= ".gif";
save_image($url,$temp_pic);
$im = imagecreatefromGif($temp_pic);
$black = ImageColorAllocate($im, 0, 0, 0);
$start_x = 10;
$start_y = 20;
$img_text = "Last Update : " . $dateoccurred;
Imagettftext($im, 10, 0, $start_x, $start_y, $black, 'Verdana.ttf', $img_text);
$save_pic = $userid . ".gif";
Imagejpeg($im, $save_pic);
ImageDestroy($im);
unlink($temp_pic);

$iconid='null';
[Windows Mobile Development and Hacking General] krofeta:
Thank you for the code, but it's not working in my image. I also copy font file.
[Windows Mobile Development and Hacking General] Tigggger:
It uses the GD library, possibly not installed with your version of php, that's the only thing I can think of.
[Windows Mobile Development and Hacking General] _LEM_:
hey guys, I'm sorry but I haven't been able to test the signature on my server yet. I will try to do that during this week and then post it in the second post of the thread.

Thanks everybody for your cooperation!
[Windows Mobile Development and Hacking General] Dtrieb:
Hi!

If i install it on my webserver (run the install.php) and set the language to german and run it after the install the language is still english.

There are no change in the config.php with language.

So can you look at that point also?

For the while i do it manually.
[Windows Mobile Development and Hacking General] khaytsus:
So if you set $language = "german"; in the config it doesn't default to German? Interesting... At first I thought this was another global variables issue but this variable is internal.
[Windows Mobile Development and Hacking General] Dtrieb:
If i set it in the config it work,

but if i run it through the install.php (Setup) it doesn´t work.
[Windows Mobile Development and Hacking General] _LEM_:
Since mcross is working on a new version we will probably not have that problem anymore. Anyway, if you guys find a way to fix that problem please post them here.
[Windows Mobile Development and Hacking General] khaytsus:
Is this the one written in .net or is it a continuation/update of PHP?
[Windows Mobile Development and Hacking General] _LEM_:
PHP. mcross is rewriting the whole official viewer.
[Windows Mobile Development and Hacking General] khaytsus:
Awesome.. I was afraid it was the .net version I heard about a while back, that'd be no good. :D Fine for folks that want that, but not a replacement for the original. :)
[Windows Mobile Development and Hacking General] peawet08:
Can I just add a request?

I setup my own server to receive information from a group of devices and this works well, the problem I have is that in Live tracking mode I'd like to be able to see ALL of the devices on the screen at the same time. I'm not much of a developer and as yet haven't been brave enough to try and figure out how the code works.

Thanks

:D Pea!
[Windows Mobile Development and Hacking General] nhvoltagenh:
+1

Maybe a Public view,

all users on the server.
[Windows Mobile Development and Hacking General] khaytsus:
I finally upgraded my Bluetooth GPS to a Columbus V900, which is an awesome GPS + Tracker... Anyone interested can google on the details.

It has a tracking mode which logs data in 1s increments by default (I think it can be modified, but not easily) or a "Spy" mode which will log a series of 8 points every 10-100 minutes. In "Spy" mode it'll run up to 30 days they say. Comes with a 2G MicroSD card, which will hold a load of data.

I've spent a bit of time today writing a Perl script which will parse the CSV datafiles it creates and posts the data into TrackMe. It parses the data, then performs some logic based on time, angle, and distance (similar to the TrackMe client) and only uploads the data if it passes the criteria. It can have each time/angle/distance set at runtime or one can use one of a few profiles I've created. Makes it easy to adjust how much data is going into TrackMe.

For example my "alldata" profile (which is what it says) for a data set I have here would be 1156 points, but my "default" profile reduces that to 81 points. Default requires a distance change of >10 feet, and only logs a point if the time is >30s or angle has changed >15 degrees. Default still gives a nice view, and obviously much less points to upload/store.

I'm still testing it and giving it some run tests, plus tweaking some parameters, but wanted to drop a line here in case anyone is interested. :)
[Windows Mobile Development and Hacking General] lalvarado:
Hi there:

I was wondering if any of you guys has though of adding a link to the marker bubble that when clicked opens a chat window (MSN, Yahoo, Talk) to do IM with a buddy on the map, and maybe somehow show the availability of that person (online, busy, etc.)

Open for suggestions. Thanks.
[Windows Mobile Development and Hacking General] djdive:
Password

Hello,

I have a question, i have install the Trackme server on my server and used it for about 2 months.

But i whant to change 2 thinks but i'm not shore where i can do this.

- I whant to use the default password auterisation (not by the .htaccess) by the install there was a question of the display is privet or public but is that change without the install page because i have a lot of trackme data.

- Is it possible to delete log data point for point, because when i'm start the log sometimes he send wrong GPS date so i have wolk 70kM in 1 sec. (very fast ;-)

Ik hear it soon.

Regards,

Dieuwert
[Windows Mobile Development and Hacking General] _LEM_:
Hi,

You should post this question in the other forum. This forum is only for development.

Regarding your questions:

1. TrackMe doesn't use an .htaccess file for authorization.

I'm not sure if I understand your question, but you should be ok specifying public or private. You won't lose any data.

2. You can delete data using date ranges. You cannot delete it point by point.

Hope it helps

Cheers
[Windows Mobile Development and Hacking General] ECdOc:
Sorry, wrong forum. Delete me pls.
[Windows Mobile Development and Hacking General] bholdman:
display all users

Is it possible to have an option in the user dropdown to show all active users on the same map?
[Windows Mobile Development and Hacking General] _LEM_:
Please guys take a look at the first for some important news about TrackMe.
[Windows Mobile Development and Hacking General] turtle2472:
Is there a way to build in the ability to remove certain points from a track within the web browser? Today's trek for me gives a great example of why it would be helpful. In a building my track points ended up way off. I had two points that just need to be removed from the track and logging into my server and SQL DB isn't practical for two points. Plus even then I'm stuck matching the time stamp because the point number isn't listed.

Is there a better way?
[Windows Mobile Development and Hacking General] khaytsus:
There's no facility to modify the data via the web viewer at all. I've often thought of this too, as sometimes I'd wind up with cellphone estimated data that's WAY WAY off and had to go in and modify it directly in the database. However, I would personally not want to attempt to modify the server in this regard because I would be afraid I'd unknowingly open a hole into the database.

That said, I would imagine actually doing it would not be difficult, possibly even trivial.. I suspect for each point the data key would be known, and creating and executing a mysql statement to delete that point would be quite easy. I would just not want to openly release something without myself having more background in interfacing safely with a DB without opening up SQL injection holes.

I might peep at this for kicks though.
[Windows Mobile Development and Hacking General] turtle2472:
Thanks for understanding my plight too. :) I certainly wouldn't want to open up my server to attack, but it's be nice to have the ability.

Also, I think you were in on this one: what do I need to do to enable the GPX Export? It says I'm not logged in etc. when I attempt to do so from the browser. What do I need to do to enable the export?
[Windows Mobile Development and Hacking General] khaytsus:
Odd on the export... Not sure, I actually have two sets of exports, one I (cobbles together) and the other someone else did, both seem to work here... No other cookie problems with TrackMe I assume?

I actually use both of them... Mine generates a link directly into Google Earth, either of them create static kml/gpx.. Although it's been a while, I forget exactly the limitations of both ;)
[Windows Mobile Development and Hacking General] sebguilbaud:
I'm willing to help, tell me if you need translation, test, packaging, etc.
[Windows Mobile Development and Hacking General] mcross:
Trackme 2.0 source

hello all,

been awhile since I have been here, I have been planning on finishing the interface I started a long time ago, but I never seem to have time. I have had a few request for the source, so here it is.

keep in mind that this version does not have user management so anyone will be able to view and modify your data.

I have modified my files to use the original config.php file, I believe you can now use the install.php to get this working, but I did not test it.

to manually configure modify the variables in the config.php : have to add your google map key and your database settings

you will also need to download the extjs library from http://www.extjs.com/products/js/download.php

this was originally developed with ext 2.0, but I downloaded the latest library(3.2.0) and did a quick test, and it is working.

extract the library to a folder named 'ext' in the 'jslib' directory.

the 2 files that do most of the work are, trackme.js and handler.php

I used information from this page to get started: http://ongmap.com/blog/?page_id=259

the extjs forums are also very helpful: http://www.extjs.com/forum/

let me know if you have any questions.
[Windows Mobile Development and Hacking General] krofeta:
Thank you very much !!!
[Windows Mobile Development and Hacking General] Dtrieb:
Would somebody go on with this and post the results here?
[Windows Mobile Development and Hacking General] krofeta:
I sucessfully install your webviewer, but I have some problems. How to config user in trackMe if this version haven't user management? I got some error in trackme application when try to transfer data.

Is this upgrade from original trackme viewer, becouse I think that some files are missing ? Do I need something from original files?

Thanks,
[Windows Mobile Development and Hacking General] mcross:
oh, sorry about that, you will have to do a search and replace in the trackme.js file, search for UID: 1, and change the '1' to which every user you want to see. I will look at the old file and add back the username select option. The first version did used an earlier version of the extjs library, upgrading to the 2.0 version required several changes.
[Windows Mobile Development and Hacking General] krofeta:
I was created first user on empty database with standard viewer becouse with EXTviewer it's not possible. Trackme report error.

Upload also not working (Error uploading position: The remote name could not be resolved or The remote server returnedan error: 404 not found...). But I was able to uploading from standard viewer.

EXT viewer working fine with showing data. It's just uploading position and create user not working for me. I am also looking forward for user selection... ;)
[Windows Mobile Development and Hacking General] mcross:
sorry for the confusion, I have now updated my post #219, the attachment now contains all the original trackme files, with the new viewer files. I believe you will be able to use the install.php file too to get started, but I did not test myself.

let me know how it goes.
[Windows Mobile Development and Hacking General] Real_Justus:
Hey Mcross

it does not work for me... No matter what I click, I always get the turning circle and nothing happens... No trip and no user ist listed dispite the fact, that there are data in the database. The original webviewer works fine (but I want yours so much :D!).

I have tryed to install via install.php and "just" replacing files in the TrackMe directory. I think I got a problem with the database acces. But I am not sure... Any ideas for a near by desperate kraut?
[Windows Mobile Development and Hacking General] mcross:
ok, so you have modified/verified the settings in the config.php for the correct database settings, and correct google api key. you have downloaded and extracted the extjs library into the folder jslib/ext/ folder. the ext folder should contain folders: adapter/ , examples/ , resources/ , src/, plus a few others, and the files ext-all.js, ext-all.debug.js

this can be put into a different directory but you will need to modify a few lines in the index.php file, just search and replace './jslib/ext/' and change.

the final thing you can do, is install firebug addon for firefox, turn it on and refresh the track me page, in the console it will show where the error is occurring.

do you know which version of php you are using? which browser and what version are you using.

I did find an extra ',' in the trackme.js file, I removed and update the zip file.
[Windows Mobile Development and Hacking General] krofeta:
Almost everything works now! Great!

I have few comments:

Date format is always US format, Units are allways imperial. Altitude on cloud is "NaN". Not using config.php settings.

Icon changer on "trackme position data" not working.

If I change User, on "trip select" are always trips from first user.

Thanks,
[Windows Mobile Development and Hacking General] Real_Justus:
I admit, that I do not know which PHP-Version I am using. My Brwoser is Firefox v3.6.3

Firebug says:

Should I replace the trackme.js?

Thanks a lot for now,

Justus
[Windows Mobile Development and Hacking General] mcross:
extra commas will only affect Internet Explorer, you are using PHP version 4,

open your handler.php file, goto line 19, should say '}elseif($mode=='weather'){'

remove everything from line 20-50 and replace with	echo "OK";

return;

it should look like this when you are done,

The section that looks up the current weather will not work.

if you can switch you server to user PHP 5 would fix the problem too.
[Windows Mobile Development and Hacking General] krofeta:
I understand, this is development version of course.

I have two users with several trips each. When change user the combo box doesn't change trips... Combo box always shows trips from first user.

one more bug: Icon changer on "trackme position data" not working.
[Windows Mobile Development and Hacking General] mcross:
I fixed that issue today, when was the last time you downloaded the zip file?, you might just try downloading again, you will just need to replace the \jslib\trackme.js and just to be sure replace the handler.php file too.

I will look at the "Icon changer"
[Windows Mobile Development and Hacking General] Real_Justus:
That did not do it... But now Firebug says, that the access to the DB is denied... Doing some research :confused:

Thank you for your effort
[Windows Mobile Development and Hacking General] krofeta:
Yes, it is working now!

Thanks,
[Windows Mobile Development and Hacking General] mcross:
it is now able to parse the handler.php file, DB is denied, I would check the setting in the config.php, if the are there and corrrect, you can try adding them to the top of the handler.php file.

take out the include("config.php"); line and then where is says

replace the variables with your actual settings.
[Windows Mobile Development and Hacking General] Real_Justus:
Thats what I did... And don´t ask me...! It is working now! :confused: :D

Last question for tonight: How often is my position refreshed in LiveTracking?

Best regards!
[Windows Mobile Development and Hacking General] mcross:
its on line 1095 of the trackme.js file, right now its set to 60 seconds.
[Windows Mobile Development and Hacking General] joco25:
When i want to download a gpx or kml file, i get this:

"Not Logged in or this is not a private system"

It is allready asked on this forum before, but i didn`t found a solution.
[Windows Mobile Development and Hacking General] sebguilbaud:
works fine for me too
[Windows Mobile Development and Hacking General] krofeta:
mcross,

How to set kmh instead mph? Altitude is not working for me and distance is in some unknown format...

Thanks,
[Windows Mobile Development and Hacking General] mcross:
in the trackme.js file, at about line 1133 is where the calculations start.

to manually change what shows on your map, you will need to modify the file in several places.

there is one call to "createMarker" on line 1202, you would need to change the

"speed" and "miles" variables to the kilometer variables, and also modify around lines 1266 and lines and 1543, replacing speed and miles variables there.

My original intent was to store these variables in a table by username so each user could have their own customization settings.
[Windows Mobile Development and Hacking General] krofeta:
I have problems with your original files with markers. Marker points are there (invisible), but images with dirrection arrow aren't.
[Windows Mobile Development and Hacking General] turtle2472:
Last time I saw this the issue was with using a sub-domain vs sub-directory in a domain. I ended up having to enter it into the settings different for the free server so I could get it to work.
[Windows Mobile Development and Hacking General] mcross:
TrackmeEXT, Few fixes

fix for Altitude not showing and a few formatting updates.

just overwrite the existing files. handler.php and trackme.js
[Windows Mobile Development and Hacking General] krofeta:
mcross,

I have problems with showing direction arrows. Did you change something (path to icons) in other files, becouse on your site it's working?
[Windows Mobile Development and Hacking General] mcross:
its looking in the directory "mapicons" for the direction arrows

the arrow images are named arrow0.png, arrow45.png, arrow90.png etc.

do you have that directory?
[Windows Mobile Development and Hacking General] krofeta:
Yes, I have mapicons directory and arroe icons inside. In download.php and export.pxp I found path:

$currentpath="http://".$_SERVER['HTTP_HOST']."/".basename(getcwd());

$customicons .="<Style id='IconArrow0'>";
$customicons .="<IconStyle>";
$customicons .="<scale>0.5</scale>";
$customicons .="<Icon>";
$customicons .="<href>".$currentpath."/arrow0.png</href>";

Is this path to icons OK?

I have trackmeEXT files on subdomain on the root.
[Windows Mobile Development and Hacking General] mcross:
the trackmeEXT viewer does not use the download or export php files for anything.

You can use Firebug to determine the icon path, Install the firebug addon, enable firebug for the trackmeEXT site, then in the firebug console goto the "Net" tab, then choose a trip, look for the "get" request for the arrow icons to see the final path its trying to use.

hopefully that will give us some insight on why the images are not showing.
[Windows Mobile Development and Hacking General] krofeta:
There is no data for arrow icons xx.png...

Obviously something is wrong with this path:

iconimage	="mapicons/arrow"+getCompassImage(direction)+".png";
[Windows Mobile Development and Hacking General] mcross:
yes, in the trackme.js at around line 1190.
[Windows Mobile Development and Hacking General] krofeta:
Obviously something is wrong with path...

I find only:

iconimage	="./mapicons/arrow"+getCompassImage(direction)+".png";

path for compass images
[Windows Mobile Development and Hacking General] Maverick_TN:
Failed to initialize. Please reload.

Any ideas where to look for what is causing this?

Have installed TrackmeEXT into a new folder and have unpacked jslib. I have copied all of my configuration settings from my old install and am using my old database. I have checked the path names for the jslib files against index.php and they are correct.

Not sure If i am using firebug right, but I think it means that it is stopping on ext-base.js line 7

Windows 7

Firefox 3.6.3

edit: Nevermind, I managed to get it working by upgrading to php5