 |
<? #!/usr/bin/php /* Author: Keith Elder, Email: k e i t h at z o r k a . c o m, AIM: ZZorKKa Purpose: Takes the file generated by jPilot which is saved as CSV and re-builds the file so it will import to the t-mobile addressbook through the desktop interface. License: GPL (go get a copy and read it if you need it) Usage: php -q convert.php dumpfile newfile
Once your file is converted, login onto www.t-mobile.com and import the file as a palm windows .txt/tab file. My import worked but I think my data was a little corrupted that I got out of it, so I had to clean a few things. Someone else reported this worked fine for them though. Send me your comments, suggestions or whatever. */ $filedump = $_SERVER['argv'][1]; #enter your file you want to convert $newfile = $_SERVER['argv'][2]; # enter the new file you wish to create
# open the file # and read it in $fp = fopen($filedump, "r"); while(!feof($fp)) { $data[] = fgetcsv($fp, 50000); } fclose($fp);
# Write data back out $fp = fopen($newfile, "w"); $count = count($data); for ($i=0; $i<=$count; $i++) { for ($x=2; $x<=26; $x++) { $line .= "\"".$data[$i][$x]."\","; } $line .= "\n"; } fputs($fp, $line); fclose($fp); echo "DONE!\n"; ?>
|
|
Login or
Register
Call Us Toll Free: (866)-549-1543
|