使用GoogleViewer在Localhost中显示文档

I have uploaded a few slides on localhost and would like to use googleviewer to display them as it is difficult using php. Is there a library in php which i can possibly use??

Can anyone please tell me how can i use googleviewer to view the documents in my localhost?

Appreciate the help in advance:) Regards Anjana

<?php

/**
 * Retrieve public ip with PHP cURL
 */
$curl_handle=curl_init();
curl_setopt($curl_handle,CURLOPT_URL,'http://whatismyip.org/');
curl_setopt($curl_handle,CURLOPT_RETURNTRANSFER,1);
curl_setopt($curl_handle,CURLOPT_CONNECTTIMEOUT,2);
$public_ip = curl_exec($curl_handle);
curl_close($curl_handle);

//echo "my ip address is ".$public_ip;

/**
 * Let's say we have the slide located
 * at http://localhost/papers/bigtable-osdi06.ppt
 * The link to view it from google viewer will be
 */

 echo 'http://docs.google.com/viewer?url='.urlencode("http://$public_ip/papers/bigtable-osdi06.ppt");

?>

I retrieve the url with the cURL trick because there isn't a PHP method to let you know your public ip and this way works both in windows or linux as long as http://whatismyip.org/ is up and running.

Edit:

Ofcource your web-server has to be accessible from the internet!