Based on the flowchart, the first major steps are presentation of the web form and recaptcha. Below is the source code for this section: <HTML> <HEAD> <TITLE>Convert Text File (.txt) to MS Word (.doc) using PHP</TITLE> </HEAD> <BODY> <font face="Courier" size="2"> </head> <body> <H2>Convert Text File to MS Word</H2> <br></br> <b>Background</b>: This will convert your text file (.txt extension) into an MS Word file (.doc extension).The converted version is compatible for MS Word 2002 but it may also work with newer versions of MS Word. <br /><br /> Bear in mind that files are deleted every 3 to 10 minutes so you need to download the converted file right away. <br /><br /> Note that after downloading and opening the file, you might encounter these two common errors: <br /> 1. MSWRD632 related errors. In this case, you need to read this solution: <font color="blue">http://social.answers.microsoft.com/Forums/en-US/wordcreate/thread/ce3a65ce-fba1-4c16-af9c-d4131a281527</font> <br /> 2.) Now if another error appears like asking you install a text converter or like that just click "Yes" to proceed to any installation. This will let you open the converted files without any error the next time around. <br /> <br /><br /> Maximum allowable Text File upload size: <b>100kB</b> <br /><br /> <!-- Input form begin --> <form NAME="texttoword" ACTION="<? echo $PHP_SELF; ?>" method="post" enctype="multipart/form-data"> <label for="file">Filename:</label> <br /><br /> <input type="file" name="file" id="file" /> <INPUT TYPE="HIDDEN" NAME="ref" VALUE="texttoword"> <br /><br /> Type the captcha below: <br /> <br /> <?php require_once('recaptchalib.php'); $publickey = "***PUT YOUR OWN PUBLIC KEY HERE***"; echo recaptcha_get_html($publickey); ?> <br /> <br /> <INPUT CLASS="DEFAULT" TYPE=SUBMIT VALUE="Convert this text file to MS Word"> </form> <br /> <br /> The code looks self-explanatory. It includes user-friendly information that will be useful if the client encounters a problem when opening the converted MS Word file. Also, the recaptcha code snippet should be placed above the submit button and the </form> tag. The form should look like the screen shot below:
blog comments powered by Disqus |
|
|
|
|
|
|
|