943,545 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 404
  • PHP RSS
Aug 16th, 2009
0

convert anyfile to html

Expand Post »
Hi! thr,

I am uploading a file in to server. At the time of downloading, it should show "view as html" as google does.

thanx in advance.

Manoj
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
manojjena1982 is offline Offline
22 posts
since Jan 2009
Aug 16th, 2009
0

Re: convert anyfile to html

Google Docs and HTML are two different things. Do you want a link that shows the HTML of a document or do you want a link to view the document in Google Docs?
Reputation Points: 47
Solved Threads: 47
Posting Whiz
FlashCreations is offline Offline
393 posts
since Sep 2008
Aug 17th, 2009
0

Re: convert anyfile to html

Hi! thr,

I am uploading a file in to server. At the time of downloading, it should show "view as html" as google does.

thanx in advance.

Manoj
This is actually a complicated task. You'll need to be able to parse different file types into HTML.

For example, converting a PDF file to HTML is different from converting a word document.

You'll have to do specific parsing for each file you want to support.

Security is also an issue here. You'll probably need to scan the documents for vulnerabilities.
Moderator
Reputation Points: 457
Solved Threads: 101
Nearly a Posting Virtuoso
digital-ether is offline Offline
1,250 posts
since Sep 2005
Aug 17th, 2009
0

Re: convert anyfile to html

yes you have to write codes for different type of files in different manner.
Reputation Points: 16
Solved Threads: 48
Posting Whiz
BzzBee is offline Offline
327 posts
since Apr 2009
Aug 18th, 2009
0

Re: convert anyfile to html

Coulld you share any idea to do this?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
manojjena1982 is offline Offline
22 posts
since Jan 2009
Aug 18th, 2009
0

Re: convert anyfile to html

Well what kind of files would you be uploading. Images? Document? Presentations? Some of these are extremely easy to view as html. For most images (except for PSD's and others that won't display in a normal browser) all you have to do is just output a simple HTML document and use the img tag to include the image in it. For non-supported formats of images, you will need to convert them to a more standard format such as PNG or JPG. This can be done simply by Googling for a php PSD to PNG converter. The same goes for any kind of document. You can find PDF to HTML converters, you can find Doc and Docx to HTML converters. All you have to do is search Google for all the file types you would like to support. I've found some of these PHP converters for you:
Reputation Points: 47
Solved Threads: 47
Posting Whiz
FlashCreations is offline Offline
393 posts
since Sep 2008

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: Question about cookies
Next Thread in PHP Forum Timeline: How to Authorize and then Capture





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC