Hi guys,
I'm having trouble reading a pdb file with PHP-PDB (http://php-pdb.sourceforge.net/modules/doc.php)
I want it to upload a PDB and spit out the actual text content from that palm doc. So here's my code (the upload works fine so just the PDB doc is screwing up right now):
$pdb = new PalmDoc("doc");
$fp = fopen($tmpName, "r");
$pdb->ReadFile($fp);
fclose($fp);
echo $pdb->WriteToStdout();
(This file is being uploaded hence $tempName)
At the moment it spits out a bunch of weird characters:
Yko»vý®_Ácà" )Ûs‘s€•eÙVo,’sÒþBÍPÆ£á”äXV~}×Ú¤dÙI{(8¶4š!÷cíµ×¦î¶ÿzòñÝŸNzwEïn9ö
I experimented like crazy and could not get it to echo actual text!
All help is definitely appreciated!
EDIT:
Further experimentation with the following code led to these results (still doesn't work)
$pdb = new PalmDoc("Name Of Document");
$fp = fopen("craphound.pdb", "r");
$pdb->ReadFile($fp);
fclose($fp);
echo $pdb->TypeID;
$recids = $pdb->GetRecordIDs();
foreach ($recids as $ID) {
$record = $pdb->GetRecordRaw($ID);
echo $record;
}
led to the follwing:
000a000000006240009b00f7000800050001000...(etc)