PHP
  Home arrow PHP arrow PHP: Creating Word Documents without .COM Objects
Dev Shed Forums 
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
iPad news and developer info.
Ads by affinity 
E-Commerce Hosting 
Linux Web Hosting 
Managed Hosting 
Small Business Hosting 
VPS Hosting 
Forums Sitemap 
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
PHP

PHP: Creating Word Documents without .COM Objects


By: Codex-M
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2010-07-26


    Table of Contents:
  • PHP: Creating Word Documents without .COM Objects
  • Strategy for creating this application
  • The Basic Web Form Source Code
  • PHP Script: Validation, File get Contents and Writing to .doc file
  • Deleting Temporary Files in the Server Upload directory

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    Summary: If you are looking for a solution to create MS Word documents without the use of .COM objects, then this tutorial will be helpful. In it, you will learn how to build an actual PHP application that can convert a .txt file into a .doc file online.

    PHP: Creating Word Documents without .COM Objects
    (Page 1 of 5 )

    Important Requirements

    Before you implement this application in your own test server, bear in mind that this was tested to work on the following setup:

    • PHP Version: 5.2.5
    • Server: Apache
    • OS: Linux
    • MS Word version: MS Word 2002

    You will need the following PHP functions/components to make this work:

    • require_once
    • $_FILES
    • file_get_contents
    • mt_rand
    • fopen
    • fwrite

    This web application won't work if you try to implement it on a free web hosting platform, because hosting agencies will disable some of the functions listed above.

    Also you will need to have a recaptcha account; this is the captcha solution that is used for this application. For the recaptcha to work, you will need:

    a. Public Key

    b. Private Key

    c. Recaptcha PHP library files

    You can get that on this page: http://www.google.com/recaptcha

    It is highly recommended that you test this application first in the local server, such as XAMPP. So make sure you have a PHP-Apache test server installed on your system before uploading files to your web hosting company.



     
     
    >>> More PHP Articles          >>> More By Codex-M
     

       

    PHP ARTICLES

    - MVC and the Zend Framework
    - PHP: Rendering Web Pages Using the Composite...
    - PHP: Creating Dynamic Web Pages with the Com...
    - Secure Encrypting and Decrypting for Your PH...
    - PHP: Creating Single View Objects with the C...
    - PHP: View Object Collections and the Composi...
    - Securing Your PHP Website
    - Determine Link Relevance and Unique Class C ...
    - PHP Composite View Design Pattern: Introduci...
    - Facebook PHP API Applications: A Second Look
    - Secure PHP Programming
    - Facebook PHP API Applications: Basic Introdu...
    - SOAP Servers and Web Services
    - Using XPath, SOAP, and More with Web Services
    - Web Services: SimpleXML


    Code Analysis Tools
    Enterprise code analysis tools that deliver quality and reliable code



    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek