Saturday, October 15, 2016

819 PHP 5 Script for a user editable Medical Dictionary


In the last blog post No. 818 here, Click to go to post No. 818 we have adventured into a Java 8 Code .java file creation for an offline usable, user editable medical dictionary with sample text. We now take up a php5 script for designing an online/offline user editable medical dictionary with a sample text file.

Some features of PHP Scripts.
1. PHP Scripts are browser-based, i.e. we have to use them with the help of browsers like Firefox, Google Chrome, Chromium, Opera, Safari etc.

ONLINE USE



2. For online use of php scripts, we have to upload php files, and the supporting data files to a host server who will give shelter to all our files. All the paid web-hosts normally allow php scripts on their servers. On the net, there are "Free" web-hosters also, with 'their advertisements' and without their advertisements. Often, they also give us a dub-domain name.

OFFLINE USE



3. For offline use of php scripts, and their testing, we need to install an apache server and php on our desktop. I have tested the following script with PHP5 supported by firefox web browser, and an apache2 server. The apache server has to be configured for localhost access with something like http://localhost/...php. For the sample medical dictionary text file, you can create your own sample medical text file with every word entry in the following model:

^`word: meaning.
^`word: meaning.
^`word: meaning.
^`word: meaning. Like this you can enter any number of words. "^" is used as a delimiter between one recorde and another record. ":' is used as a separator between 'word' and its 'meaning'.

Or if you want a sample text file, which I have designed, you can use the file given by me in our blogpost No. 817 (See link at the beginning) in the ybmedicdicti.zip file uploaded by me at SourceForge.Net. It has about 10,000 words collected from American Government websites. That file and the Java code is not for Commercial Use. It is for educational purposes. This PHP5 script is also intended for Educational Purposes only.

Question: Can we use this script for general dictionaries, Telugu Dictionaries?



Ans: This script uses a text file as data, with a delimiter "^". You can create any number of dictionaries. Not only medical dictionaries, but also general dictionaries. Both php5 and Java 8 support utf-8. If there are Telugu fonts on the Desktop, almost all browsers particularly Firefox and Google Chrome, Chromium support UTF-8 coding. Hence we can use even for Telugu Dictionaries.
Here is the script. This script contains both html and php tags. Unfortunately, at this blogspot web-page, all the script is not showing correctly. I am googling, to find ways to show these html and php tags correctly with syntax highlighting of tags, variables.

This script, you have to save as a php file in a text editor. It is to be saved in your public_html directory. In Ubuntu all versions, its default location will be /var/www. But /var/www is a secured area. File saving filesinto it, you have to use a sudo password.


To continue . सशेष. ఇంకా ఉంది.

No comments:

Post a Comment

ఘోరమైన విమర్శలకు కూడ స్వాగతం, జవాబులు ఇవ్వబడతాయి.