Go Back   CP Web Hosting - reseller hosting > Server Scripting > PHP
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-03-2007, 10:36 AM
Senior Member
 
Join Date: May 2007
Posts: 345
Default a site translator

Hi,

I am trying to use a site translator but i am having problems as my server does not accept the function file_get_contents.

Advance help for any help
Reply With Quote
  #2 (permalink)  
Old 07-03-2007, 10:56 AM
Senior Member
 
Join Date: Apr 2007
Posts: 347
Default

If file_get_contents() is not supported/enabled, then neither is file(), it is most likely due to file handling functions being disabled for security reasons. Unless it is PHP4 < 4.3...
Reply With Quote
  #3 (permalink)  
Old 07-03-2007, 10:58 AM
Senior Member
 
Join Date: May 2007
Posts: 290
Default

u can use direct links to the Google translator

Code:
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://64.233.179.104/translate_c?hl=en&ie=UTF-8&oe=UTF-8&langpair=$lang&u=" . urlencode($_GET["u"]) . "&prev=/language_tools");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$html = curl_exec($ch);
curl_close($ch);
?>
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 02:25 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0