How to convert urls to docs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Experts,
 
I need to convert urls to documents.
 
Can you please check it in http://www.celltonet.com/urltodoc.php
 
In the above page, add
 
 http://www.yahoo.com 
 
 http://www.google.com
 
in text box.Then click on "create doc".It opens one document file with seperate urls in each page.I am receving one extra page at the end of the document.
 
Can you please check my code once
 
$str=trim($_REQUEST['urls']);// getting urls
$fp = fopen("/home2/celltone/public_html/urltodoc.doc", 'w+');
$str=explode("http://www",$str);
for($i=1;$i<count($str);$i++) {
fwrite($fp,"http://www".$str[$i]);
if($i!=(count($str)))
fwrite($fp, "\x0C\r\n");
}
fwrite($fp, $str);
fclose($fp); 
header('Content-type: application/msword');
header('Content-Disposition: attachment; filename="urltodoc.doc"');
readfile('/home2/celltone/public_html/urltodoc.doc'); 
 
One more doubt is
 
For example, if I put the yahoo site, the whole page of the site should appear in the doc.  How can i do like that.
 
Thanks,
Gangadhar


      Chat on a cool, new interface. No download required. Go to http://in.messenger.yahoo.com/webmessengerpromo.php

[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux