Re: Fax server question.




Uzytkownik "Steve" <googlespam@xxxxxxxxxxxxx> napisal w wiadomosci
news:1129655413.746951.251860@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
>
>> I would like to build up a web page, which will show me files, which are
>> fax
>> files (image files) (from fax server).
>
> We need more information on your setup. Are the descriptions to be
> stored in a database or a flat file? Sounds like you need two separate
> applications: a viewer application that lists the descriptions with
> links to the images; and a maintenance application that lets users add
> a description for a particular image.
>
> You don't say if the list is static or not, although you imply that at
> some time or other you don't know the file names. The maintenance
> application will have to scan the fax image files folder to see if any
> new files have been added. Collect the list of files from that folder
> and compare with the known list in your database/flat file. If there
> are any new ones, add them to your database.
>
> $faxlist = array();
> $fh = opendir( '/path/to/fax/files/' );
> while( false !== ( $file = readdir( $fh ) ) )
> {
> // exclude folders...
> if( $file != "." && $file != ".." && $file != "" )
> {
> // check file type...
> $path_parts = pathinfo( $file );
> if( $path_parts[ 'extension' ] == 'fax' ) // whatever the
> image ext is
> {
> // add to list...
> $faxlist[] = $path_parts[ 'basename' ];
> }
> }
> }
> closedir($fh);
> sort( $faxlist );
> reset( $faxlist );
> foreach( $faxlist as $faxname )
> {
> // print "<a
> href=\"showfax.php?faxfile=$faxname\">$faxname</a><br />";
>
> if( !exists_in_my_database( $faxname ) )
> {
> add_to_my_database( $faxname );
> }
> }
>
> Functions exists_in_my_database() and add_to_my_database() depend on
> your setup.
>
>> I would like have the files on the list on web page, because I would like
>> to
>> link the these image files
>> with some descriptions, which is taken manualy by a user. What is the
>> best
>> solution to link the file from fax server
>> with the descriptions.
>
> I would use a database to store filename and description, plus any
> other useful metadata that would be useful - such as file creation
> date, so that old fax files can be purged later.
>
> Don't store the image files in the database, it's a waste of resources.
> Leave them in the filesystem and save the filename only. Displaying the
> fax image depends on the image file format. If they are JPEG, GIF or
> PNG then use header() to tell the browser what type of image and the
> appropriate image output function (See
> <http://www.php.net/manual/en/ref.image.php>.) If they are TIFF, hmmmm.
> External application needed, I think.
>
> ---
> Steve
>

Sorry for not writing all information. The fax files can be added at any
time, so
the fax files names and numbers of the fax files changes dynamically. I
imagined
that there will be a refresh button to refresh the list of the fax files on
the web page.
Is it a good idea?

Yes, I know that storing images is not a good idea. I know that it`s better
to
store links of the files, but thanx for the answer.

Saying the descirptions of the fax files I meant the ID order which is
strongly
connected to this exact fax file and cannot be dropped. I think that the
best
idea would be to store the file names and ID Orders connected to them.

Thank you for the code.

Kind regards
M. from Poland


.



Relevant Pages

  • Re: Exchange 2003 Private Store Corruption
    ... Information Store First Storage Group: The database page read from ... Online Diagnostic Utility says "Correctable Memory Threshold Exceeded" ... the server back up and running without the faulty memory installed. ...
    (microsoft.public.exchange.admin)
  • RE: Test-MapiConnectivity failure on Exchange 2007 in coexistence
    ... the default store location caused the database store failed to mount. ... built-in Exchange server 2007 Database Troubleshooter and Eseutil tool (/mh ...
    (microsoft.public.exchange.setup)
  • Exchange 2003 Ops...
    ... Then went and shut down the exchange information store and all ... database was not shutdown cleanly ... MicrosoftExchange Server Database Utilities ...
    (microsoft.public.exchange.admin)
  • File Fun
    ... Ok, I'm mulling over different techniques to solve a problem, and ... I'm weighing and experimenting with storing data in a MySQL database ... server somewhere, and just store the path to the file in the DB. ...
    (comp.lang.php)
  • Re: store will not mount
    ... of the database not being at the same service pack level of the server. ... "TOM WELLS" wrote in message ... >>until the store has been mounted at least once. ...
    (microsoft.public.exchange2000.information.store)