0

by using google api ..
i tried to translate language...
it works but not for the full page only for selected div tag...
plese tell me how to modify or
how i get the full page translated text....body of html or php page

<?
$lang=$_GET['lang'];

?>
<html>
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">

    google.load("language", "1");

    function initialize() {
      var text = document.getElementById("text").innerHTML;
     // var text = content.document.body;      
google.language.detect(text, function(result) {
        if (!result.error && result.language) {
          google.language.translate(text, result.language, "<?=$lang?>",
                                    function(result) {
            //var translated = document.getElementById("translation");
			var translated = document.getElementById("text");
            if (result.translation) {
              translated.innerHTML = result.translation;
			//text.innerHTML = '';
            }
          });
        }
      });
    }
    google.setOnLoadCallback(initialize);

    </script>
  </head>
  <body>
<a href="xyz.php?lang=hi" title="Hindi" rel="nofollow"><img  src="images/hi.png" alt="Hindi" /></a>
<a href="xyz.php?lang=ar" title="Arabic" rel="nofollow"><img  src="images/ar.png" alt="Arabic" /></a>
<a href="xyz.php?lang=zh-CN" title="Chinese" rel="nofollow"><img  src="images/zh.png" alt="Chinese" /></a>
<a href="xyz.php?lang=nl" title="Dutch" rel="nofollow"><img  src="images/nl.png" alt="Dutch" /></a>
<a href="xyz.php?lang=en" title="English" rel="nofollow"><img  src="images/en.png" alt="English" /></a>
<a href="xyz.php?lang=fi" title="Finnish" rel="nofollow"><img  src="images/fi.png" alt="Finnish" /></a>
<a href="xyz.php?lang=de" title="German" rel="nofollow"><img  src="images/de.png" alt="German" /></a>
<a href="xyz.php?lang=it" title="Italian" rel="nofollow"><img  src="images/it.png" alt="Italian" /></a>
<a href="xyz.php?lang=ko" title="Korean" rel="nofollow"><img  src="images/ko.png" alt="Korean" /></a>
<a href="xyz.php?lang=ru" title="Russian" rel="nofollow"><img  src="images/ru.png" alt="Russian" /></a>
<a href="xyz.php?lang=es" title="Spanish" rel="nofollow"><img  src="images/es.png" alt="Spanish" /></a>
<a href="xyz.php?lang=fr" title="French" rel="nofollow"><img  src="images/fr.png" alt="French" /></a>
   
 <div id="text">Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.. 
</div>
<span class="bluenormal">   </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.   </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.  </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration. </span><br/><br/>   
 <div id="translation"></div>

  </body>
</html>
0

by using google api ..
i tried to translate language...
it works but not for the full page only for selected div tag...
plese tell me how to modify or
how i get the full page translated text....body of html or php page

<?
$lang=$_GET['lang'];

?>
<html>
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
    <script type="text/javascript">

    google.load("language", "1");

    function initialize() {
      var text = document.getElementById("text").innerHTML;
     // var text = content.document.body;      
google.language.detect(text, function(result) {
        if (!result.error && result.language) {
          google.language.translate(text, result.language, "<?=$lang?>",
                                    function(result) {
            //var translated = document.getElementById("translation");
			var translated = document.getElementById("text");
            if (result.translation) {
              translated.innerHTML = result.translation;
			//text.innerHTML = '';
            }
          });
        }
      });
    }
    google.setOnLoadCallback(initialize);

    </script>
  </head>
  <body>
<a href="xyz.php?lang=hi" title="Hindi" rel="nofollow"><img  src="images/hi.png" alt="Hindi" /></a>
<a href="xyz.php?lang=ar" title="Arabic" rel="nofollow"><img  src="images/ar.png" alt="Arabic" /></a>
<a href="xyz.php?lang=zh-CN" title="Chinese" rel="nofollow"><img  src="images/zh.png" alt="Chinese" /></a>
<a href="xyz.php?lang=nl" title="Dutch" rel="nofollow"><img  src="images/nl.png" alt="Dutch" /></a>
<a href="xyz.php?lang=en" title="English" rel="nofollow"><img  src="images/en.png" alt="English" /></a>
<a href="xyz.php?lang=fi" title="Finnish" rel="nofollow"><img  src="images/fi.png" alt="Finnish" /></a>
<a href="xyz.php?lang=de" title="German" rel="nofollow"><img  src="images/de.png" alt="German" /></a>
<a href="xyz.php?lang=it" title="Italian" rel="nofollow"><img  src="images/it.png" alt="Italian" /></a>
<a href="xyz.php?lang=ko" title="Korean" rel="nofollow"><img  src="images/ko.png" alt="Korean" /></a>
<a href="xyz.php?lang=ru" title="Russian" rel="nofollow"><img  src="images/ru.png" alt="Russian" /></a>
<a href="xyz.php?lang=es" title="Spanish" rel="nofollow"><img  src="images/es.png" alt="Spanish" /></a>
<a href="xyz.php?lang=fr" title="French" rel="nofollow"><img  src="images/fr.png" alt="French" /></a>
   
 <div id="text">Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.. 
</div>
<span class="bluenormal">   </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.   </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.  </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration. </span><br/><br/>   
 <div id="translation"></div>

  </body>
</html>

Why use a javascript api when I have provided you with a php api???
I have also just improved the loading time of this api and to embed your webpage just use the following two files with the exact same names.

index.php

<?
set_time_limit(0);
function translate($textSource, $langSource, $langTarget='')
    {
    if ($langTarget=='') {$langTarget='en';}
    if ($langSource!==$langTarget)
        {
        $textSource=preg_split('/(<|>)/',$textSource);
        $idz=0;
        $openbracket=1;
        while (isset($textSource[$idz]))
        {
        if ($openbracket==1)
            {
            if (preg_match('/[A-Za-z]/',$textSource[$idz]))
                {
                $ch = curl_init();
                curl_setopt_array($ch, array(
                CURLOPT_URL => 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=' . urlencode($textSource[$idz]) . '&langpair=' . urlencode($langSource . '|' . $langTarget),
                CURLOPT_RETURNTRANSFER => true
                ));
                $ret = json_decode(curl_exec($ch), true);
                curl_close($ch);
                $bracket='<';
                $openbracket=0;
                $endresult.=$ret['responseData']['translatedText'].$bracket;
                } else {
                $bracket='<';
                $openbracket=0;
                $endresult.=preg_replace('/[<](.*[<].*)/','$1','<'.$textSource[$idz].$bracket);
                }
            } else {
            $bracket='>';
            $openbracket=1;
            $endresult.=$textSource[$idz].$bracket;
            }
        $idz+=1;
        }
        $endresult=preg_replace('/(.*)\</','$1',$endresult);
        return $endresult;
        } else {
        return $textSource;
        }
    }
if (!isset($_GET['page']))
    {
    $file='default.php';
    } else {
    $file=$_GET['page'];
    }
$data=file_get_contents('http://'.preg_replace('/(.*)\/[^\/]+/','$1/',$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']).$file);
echo translate($data,'en',$_GET['lang']);

?>

default.php

<?
$lang=$_GET['lang'];

?>
<html>
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
<a href="index.php?lang=hi" title="Hindi" rel="nofollow"><img  src="images/hi.png" alt="Hindi" /></a>
<a href="index.php?lang=ar" title="Arabic" rel="nofollow"><img  src="images/ar.png" alt="Arabic" /></a>
<a href="index.php?lang=zh-CN" title="Chinese" rel="nofollow"><img  src="images/zh.png" alt="Chinese" /></a>
<a href="index.php?lang=nl" title="Dutch" rel="nofollow"><img  src="images/nl.png" alt="Dutch" /></a>
<a href="index.php?lang=en" title="English" rel="nofollow"><img  src="images/en.png" alt="English" /></a>
<a href="index.php?lang=fi" title="Finnish" rel="nofollow"><img  src="images/fi.png" alt="Finnish" /></a>
<a href="index.php?lang=de" title="German" rel="nofollow"><img  src="images/de.png" alt="German" /></a>
<a href="index.php?lang=it" title="Italian" rel="nofollow"><img  src="images/it.png" alt="Italian" /></a>
<a href="index.php?lang=ko" title="Korean" rel="nofollow"><img  src="images/ko.png" alt="Korean" /></a>
<a href="index.php?lang=ru" title="Russian" rel="nofollow"><img  src="images/ru.png" alt="Russian" /></a>
<a href="index.php?lang=es" title="Spanish" rel="nofollow"><img  src="images/es.png" alt="Spanish" /></a>
<a href="index.php?lang=fr" title="French" rel="nofollow"><img  src="images/fr.png" alt="French" /></a>
   
 <div id="text">Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.. 
</div>
<span class="bluenormal">   </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.   </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.  </span><br/><br/>

<span class="bluenormal"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration. </span><br/><br/>   
 <div id="translation"></div>

  </body>
</html>

And I have tested it and takes about 13 seconds to translate with better compatibility than javascript. And whenever you link to a page, you link to index.php?page=pagename.php unless you are linking to the default page which is just index.php
Also the default.php and any other php file (except index.php) can contain any php/html code you like and it will be translated to the selected language by index.php However the index.php file I recommend that you don't change as it is the translator which does nothing else other than including files and translating the included() files.
Any questions?

0

My file:-google.translator.php
location:-C://xampp/htdocs/translator/google.translator.php

<?php

$lang=$_GET['lang'];
 // echo translate($data,'en',$_GET['lang']);
	set_time_limit(0);
	function translate($textSource, $langSource, $langTarget='')
	{
		if ($langTarget=='') {$langTarget='en';}
			if ($langSource!==$langTarget)
			{
				$textSource=preg_split('/(<|>)/',$textSource);
				$idz=0;
				$openbracket=1;
				while (isset($textSource[$idz]))
				{
					if ($openbracket==1)
					{
						if (preg_match('/[A-Za-z]/',$textSource[$idz]))
						{
							$ch = curl_init();
							curl_setopt_array($ch, array(
							CURLOPT_URL => 'http://ajax.googleapis.com/ajax/services/language/translate?v=1.0&q=' . urlencode($textSource[$idz]) . '&langpair=' . urlencode($langSource . '|' . $langTarget),
							CURLOPT_RETURNTRANSFER => true
							));
							$ret = json_decode(curl_exec($ch), true);
							curl_close($ch);
							$bracket='<';
							$openbracket=0;
							$endresult.=$ret['responseData']['translatedText'].$bracket;
						} 
						else
						{
							$bracket='<';
							$openbracket=0;
							$endresult.=preg_replace('/[<](.*[<].*)/','$1','<'.$textSource[$idz].$bracket);
						}
			
					}
				else
				{
					$bracket='>';
					$openbracket=1;
					$endresult.=$textSource[$idz].$bracket;
				}
					$idz+=1;
			}
			$endresult=preg_replace('/(.*)\</','$1',$endresult);
			return $endresult;
		}
		 else
		 {
		return $textSource;
		}
	}
 
// example usage
  $data=file_get_contents('C://xampp/htdocs/translator/google.translator.php');
//$data="Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.. ";
 echo $trans_text = translate($data, 'en', $_GET['lang']);
if ($trans_text !== false) {
        $trans_text;
}


?>
<html>
  <head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <script type="text/javascript" src="http://www.google.com/jsapi"></script>
  </head>
  <body><br>
   <a href="google.translator.php?lang=hi" title="Hindi" rel="nofollow"><img  src="images/hi.png" alt="Hindi" /></a>
<a href="google.translator.php?lang=ar" title="Arabic" rel="nofollow"><img  src="images/ar.png" alt="Arabic" /></a>
<a href="google.translator.php?lang=zh-CN" title="Chinese" rel="nofollow"><img  src="images/zh.png" alt="Chinese" /></a>
<a href="google.translator.php?lang=nl" title="Dutch" rel="nofollow"><img  src="images/nl.png" alt="Dutch" /></a>
<a href="google.translator.php?lang=en" title="English" rel="nofollow"><img  src="images/en.png" alt="English" /></a>
<a href="google.translator.php?lang=fi" title="Finnish" rel="nofollow"><img  src="images/fi.png" alt="Finnish" /></a>
<a href="google.translator.php?lang=de" title="German" rel="nofollow"><img  src="images/de.png" alt="German" /></a>
<a href="google.translator.php?lang=it" title="Italian" rel="nofollow"><img  src="images/it.png" alt="Italian" /></a>
<a href="google.translator.php?lang=ko" title="Korean" rel="nofollow"><img  src="images/ko.png" alt="Korean" /></a>
<a href="google.translator.php?lang=ru" title="Russian" rel="nofollow"><img  src="images/ru.png" alt="Russian" /></a>
<a href="google.translator.php?lang=es" title="Spanish" rel="nofollow"><img  src="images/es.png" alt="Spanish" /></a>
<a href="google.translator.php?lang=fr" title="French" rel="nofollow"><img  src="images/fr.png" alt="French" /></a>
   
 <div id="text">Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.. 
</div><br/><br/>   
<span class="bluenormal" id="text1"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.   </span><br/><br/>

<span class="bluenormal" id="text2"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.  </span><br/><br/>

<span class="bluenormal" id="text3"> Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration. </span><br/><br/>   
 <div id="translation"></div>

  </body>
</html>

to translate it takes 1 min and shows output...

?php $lang=$_GET['lang']; // echo translate($data,'en',$_GET['lang']); set_time_limit(0); function translate($textSource, $langSource, $langTarget='') { if ($langTarget=='') {$langTarget='en';} if ($langSource!==$langTarget) { $textSource=preg_split('/(>|)/',$textSource); $idz=0; $openbracket=1; while (isset($textSource[$idz])) { if ($openbracket==1) { if (preg_match('/[A-Za-z]/',$textSource[$idz])) { $ch = curl_init(); curl_setopt_array($ch, array( CURLOPT_URL =>'http://ajax.googleapis.com/ajax/services/language/translate؟v=1.0&q ='. urlencode دولار (textSource [$ idz]). '& langpair ='. urlencode دولار (langSource. '|'. langTarget دولار) ، CURLOPT_RETURNTRANSFER = true )); $ret = json_decode(curl_exec($ch), true); curl_close($ch); $bracket='>'؛ دولار openbracket = 0 ؛ دولار endresult.= $ المتقاعد [' responseData '] [' translatedText ']. شريحة دولار ؛) والا (دولار شريحة =''; $openbracket=0; $endresult.=preg_replace('/[>](.*[<].*)/','$1','>'. دولار textSource [$ idz]. شريحة دولار) ؛)) والا (شريحة دولار =''; $openbracket=1; $endresult.=$textSource[$idz].$bracket; } $idz+=1; } $endresult=preg_replace('/(.*)\>/'،'$ 1 '، $ endresult) ، مقابل مبلغ endresult ؛) والا (عودة دولار textSource ؛)) / / على سبيل المثال استخدام البيانات دولار = file_get_contents (' جيم : / / xampp / htdocs / مترجم / google.translator.php ' (؛) / / $ البيانات = "الرسمية ، هي إدارة الدعم الميداني للبحث عن جهل أن تقدم عن طريق توسيع الطفل العقدة الأولى من البحث شجرة ، وبالتالي يبدو أن نذهب إلى مدى أبعد وأعمق من أن يتم العثور على الهدف العقدة ، أو حتى يضرب العقدة التي أي الأطفال ، ثم يتراجع البحث ، والعودة إلى أحدث العقدة انه لم ينته بعد استكشاف. وفي غير متكررة التنفيذ ، والتوسع في جميع الفروع ، طازجة إضافة إلى كومة LIFO للاستكشاف.. "صدى trans_text دولار = ترجمة) البيانات دولار ، 'én' ، $ _GET [ 'لانج']) ؛ إذا دولار (trans_text! == كاذبة) ($ trans_text ؛)؟ >هتمل >رأس >الفوقية المتشعب بين يعادل = "نوع المحتوى" محتوى = "نص / هتمل ؛ محارف = الرموز العالميه لتحوير الهيئة - 8" >سكريبت النوع = "نص / جافا سكريبت" src = "http://www.google.com/jsapi"<>/ سكريبت >/ رئيس >جسم<>ر. >أ href = "google.translator.php؟ انج مرحبا =" عنوان = "الهندية" rel = "nofollow"<>عرض وطلب src = "صور / hi.png" بديل = "الهندية" /<>/ أ >أ href = "google.translator.php؟ انج ع =" عنوان = "العربية" rel = "nofollow"<>عرض وطلب src = "صور / ar.png" بديل = "العربية" /<>/ أ >أ href = "google.translator.php؟ انج = zh - سى ان" عنوان = "الصينية" rel = "nofollow"<>عرض وطلب src = "صور / zh.png" بديل = "الصينية" /<>/ أ >أ href = "google.translator.php؟ = نيكولا لانغ لانغ" عنوان = "الهولندية" rel = "nofollow"<>عرض وطلب src = "صور / nl.png" بديل = "الهولندية" /<>/ أ >أ href = "google.translator.php؟ انج én =" عنوان = "الإنكليزية" rel = "nofollow"<>عرض وطلب src = "صور / en.png" بديل = "الإنكليزية" /<>/ أ >أ href = "google.translator.php؟ انج الفرنسيسكان =" عنوان = "الفنلندية" rel = "nofollow"<>عرض وطلب src = "صور / fi.png" بديل = "الفنلندية" /<>/ أ >أ href = "google.translator.php؟ = دي لانج" عنوان = "الألمانية" rel = "nofollow"<>عرض وطلب src = "صور / de.png" بديل = "الألمانية" /<>/ أ >أ href = "google.translator.php؟ انج =" عنوان = "الايطالية" rel = "nofollow"<>عرض وطلب src = "صور / it.png" بديل = "الايطالية" /<>/ أ >أ href = "google.translator.php؟ انغ كو =" عنوان = "الكورية" rel = "nofollow"<>عرض وطلب src = "صور / ko.png" بديل = "الكورية" /<>/ أ >أ href = "google.translator.php؟ انغ رو =" عنوان = "الروسية" rel = "nofollow"<>عرض وطلب src = "صور / ru.png" بديل = "الروسية" /<>/ أ >أ href = "google.translator.php؟ انج دإط =" عنوان = "الاسبانية" rel = "nofollow"<>عرض وطلب src = "صور / es.png" بديل = "الاسبانية" /<>/ أ >أ href = "google.translator.php؟ انج الاب =" عنوان = "الفرنسية" rel = "nofollow"<>عرض وطلب src = "صور / fr.png" بديل = "الفرنسية" /<>/ أ >شعبة معرف = "نص"Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.. >شعبة<>ر /<>ر / >تمتد الطبقة = "bluenormal" معرف = "text1"< Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration. >/ تمتد<>ر /<>ر / >تمتد الطبقة = "bluenormal" معرف = "text2"< Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration. >/ تمتد<>ر /<>ر / >تمتد الطبقة = "bluenormal" معرف = "text3"< Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration. >/ تمتد<>ر /<>ر / >شعبة معرف = "ترجمة"<>شعبة >/ الهيئة >/ هتمل >  
//Flag images
Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration..


Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.

Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.

Formally, DFS is an uninformed search that progresses by expanding the first child node of the search tree that appears and thus going deeper and deeper until a goal node is found, or until it hits a node that has no children. Then the search backtracks, returning to the most recent node it hadn't finished exploring. In a non-recursive implementation, all freshly expanded nodes are added to a LIFO stack for exploration.

How to solve this??

0

The line with the $data= variable needs to be replaced with the following:

$data=file_get_contents('http://localhost/translator/google.translator.php');

And as I mentioned in my previous post, you will need to have two separate files, one for the translator and the other as the file to be translated. Also why don't you try to recompile to example I gave you in my previous post without any modifications. That might be a lot easier as it worked for me.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.