I'm going crazy I can't understand why it doesn't work ...
I have this web page with this html:
<table>
  <tbody>
    <tr><tr>
    <tr>
        <td> 
            <table class="style124">
                <tbody>
                    <tr>
                        <td>A</td>
                    </tr>
                    <tr>
                        <td>B</td> //THIS !!
                    </tr>
                </tbody>
            </table>
        </td>
    </tr>
    <tr></tr>
  </tbody>
</table>
i want to print text inside <td> with comment ("This") and i'm trying:
$vuoto= $dom-> getElementsByClassName('style124') -> getElementsByTagName('tbody') -> getElementsByTagName('tr')[1] -> getElementsByTagName('td') ->textContent;
echo $vuoto;
but i have this error:
Uncaught Error: Call to undefined method DOMDocument::getElementsByClassName()
EDIT
 $url = "https://www.nihilscio.it/Manuali/Lingua%20latina/Verbi/Coniugazione_latino.asp?verbo=fero1+&lang=IT_";
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_USERAGENT,'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.17 (KHTML, like Gecko) Chrome/24.0.1312.52 Safari/537.17');
curl_setopt($ch, CURLOPT_AUTOREFERER, true); 
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$html = curl_exec($ch);
$dom = new DOMDocument();
// set error level
$internalErrors = libxml_use_internal_errors(true);
$dom->loadHTML($html);
// Restore error level
libxml_use_internal_errors($internalErrors);
EDIT 2
    <body>
      Il sito è in manutenzione,
      <a href="../../../Posta/contatti.asp?testoerrore=fero1 /">segnalateci</a> eventuali errori.
      <table>
        <!-- INIZIO TABELLA PRINCIPALE-->
        <tbody>
          <tr>
            <td style="height: 34px">
              Buona navigazione con NihilScio!  <a target="_blank" href="https://www.facebook.com/NihilScio/"><img src="https://www.nihilscio.it/images/fb.jpg" alt="Pagina facebook"></a>
            </td>
          </tr>
          <tr>
            <td class="style105">
              <!--title="Herculaneum (Ercolano) - bassorilievo"-->
              <br>
              <span class="style112"><em>NS NihilScio</em></span>
              <br><a>Educational search engine</a>    <a href="../../../index.asp">Home</a>
            </td>
          </tr>
          <tr>
            <td>
              <table cellspacing="0" cellpadding="0">
                <tbody>
                  <tr>
                    <td>
                      <form name="uscita">
                        <table class="style123" cellspacing="0" cellpadding="0">
                          <tbody>
                            <tr>
                              <td style="height: 22px">
                                Coniugazione/declinazione
                              </td>
                              <td style="height: 22px">
                              </td>
                            </tr>
                            <tr title="Per favore non utilizzare caratteri accentati o speciali">
                              <td>
                                <input type="text" id="verbo" name="verbo" value="fero1 " size="60" style="font-size: 16pt; width: 200px">
                                <!--    <input type="submit" onclick="javascript:validainput()" value=">>" style="font-size: 14pt; width: 37px; background-color: #6699cc; color:blue; height: 25px;"/>  -->
                                <input type="submit" onclick="speciali(' ')" value=" >> " style=" width: 40px;  height: 28px;  font-size:large; background-color:#99CCFF;  ">
                                <br>
                                <a onclick="speciali('á')"> <span>á    </span> </a>
                                <a onclick="speciali('é')"> <span>é    </span> </a>
                                <a onclick="speciali('è')"> <span>è    </span> </a>
                                <a onclick="speciali('ì')"> <span>ì    </span> </a>
                                <a onclick="speciali('í')"> <span>í    </span> </a>
                                <a onclick="speciali('ò')"> <span>ò</span> </a><br><br>
                                <a onclick="speciali('ó')"> <span>ó    </span> </a>
                                <a onclick="speciali('ù')"> <span>ù    </span> </a>
                                <a onclick="speciali('ú')"> <span>ú    </span> </a>
                                <a onclick="speciali('ü')"> <span>ü    </span> </a>
                                <a onclick="speciali('ñ')"> <span>ñ    </span> </a>
                                <a onclick="speciali('ç')"> <span>ç</span> </a>
                              </td>
                              <td>
                                <a href="Coniugazione_latino.asp?verbo=fero1 &lang=EN_"> English</a>
                              </td>
                            </tr>
                            <tr>
                              <td title="Questa opzione è necessaria solo quando il vocabolo (non latino) da cercare  può essere confuso con parole latine" style="height: 21px; ">
                                Traduci in Latino
                                <input type="checkbox" name="tradinv" value="1">
                              </td>
                              <td style="height: 21px">
                                <a href="Coniugazione_latino.asp?verbo=fero1 &lang=ES_">Español</a>
                              </td>
                            </tr>
                            <tr>
                              <td style="height: 22px; " valign="bottom"><span class="HTML_TAG">
                                  It<input type="radio" name="lang" value="IT_" checked="checked">
                                  En<input type="radio" name="lang" value="EN_">
                                  Es<input type="radio" name="lang" value="ES_">
                                </span>
                              </td>
                              <td style="height: 22px">
                                <img alt="Versione italiana" src="https://www.nihilscio.it/Ita.png">Italiano
                              </td>
                            </tr>
                          </tbody>
                        </table>
                      </form>
                    </td>
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
          <tr>
            <td>
              <!--style="height: 136px>------ SECONDA RIGA T. P. -->
              <button id="frasi" onclick="javascript:PopupCentrata1('https://www.nihilscio.it/NS/EstraiFrasiClassici.asp?verbo=fero1 /&verboconsel=&lang0=IT_&lang=LT_')" class="style119"> Vocabolari e frasi</button>
              <!--  <table cellspacing="0"> -->
            </td>
          </tr>
          <tr>
            <td>
              <table class="style124">
                <tbody>
                  <tr>
                    <td><span class="HTML_TAG">Vocaboli trovati: </span></td>
                  </tr>
                  <!--<td></td></tr> -->
                  <tr>
                    <td>
                    </td>
                    <!--<td title="">more...</td> -->
                  </tr>
                </tbody>
              </table>
            </td>
          </tr>
            
    <tr><td>
        
        <span class="style13"> fero1:</span>
        <span class="HTML_ELM">vocabolo non trovato.</span><a href="../../../Posta/contatti.asp?testoerrore=fero1 /">Comunica errori</a>
        
    </td></tr>
    <tr><td>
        La parola non è ancora in archivio.<br>Grazie per averla cercata<br>Riprova più tardi<br>Si raccomanda di non utilizzare segni di punteggiatura e caratteri speciali e di scrivere al massimo 5 parole interspaziate.<br>es.: puella a bonis pueris amata est <br>In caso di errore ci scusiame e la preghiamo di <a href="../../../Posta/contatti.asp?testoerrore=fero1 /">comunicarcelo.</a>
      
    </td></tr>
         <tr><td>
        <a href="https://www.nihilscio.it/nihilscio.asp?cat=Latino&keyw=fero1 /" class="HTML_ELM">
        <span class="style43"><strong>Continua la ricerca sul web con NihilScio</strong></span></a>
        </td></tr>
        
    <tr><td><span><em>NS-NihilScio</em>©2009-2020</span></td></tr>
    </tbody></table>
                
    <script type="text/javascript">
    function Popup(apri)
    {
    var asse_x = event.clientX;
        var asse_y = event.clientY;
        
     var stile = "top="+asse_y + ",left="+asse_x + ",width=250, height=30, lacation=no, status=no, menubar=no, toolbar=no, scrollbars=no";
       
    let newWin = window.open("", "traduzione", stile  ); /*"width=200,height=200"); about:blank*/
    /*newWin.document.write("Hello, world!"); */
    /*let newWin = window.open("traduzione", "hello", "width=200,height=200");*/
    newWin.document.write(apri); 
    //newWin.close();
     /* window.open(apri, "", stile);*/
    }
            
    function PopupCentrata1(apri)
        {
        var w = 900;
        var h = 350;
        document.getElementById("frasi").innerHTML = '<iframe' + ' src=' + '"' + apri + '"' + ' width=' + w  + ' height=' + h + '></iframe>'; //"\"" + + "\"" 
        }
    function visualizzatuttoatt0() {
        document.getElementById("ConCompAtt0").innerHTML =  "";
        }
            
    function visualizzatuttopass0() {
        document.getElementById("ConCompPass0").innerHTML =  "";
        }
            
    function visualizzatuttoatt1() {
        document.getElementById("ConCompAtt1").innerHTML =  "";
        }
    function visualizzatuttopass1() {
        document.getElementById("ConCompPass1").innerHTML = "";
        }
                
    function visualizzatuttoatt2() {
        document.getElementById("ConCompAtt2").innerHTML = "";
        }
                
    function visualizzatuttopass2() {
        document.getElementById("ConCompPass2").innerHTML = "";
        }
                
    function visualizzatuttoatt3() {
        document.getElementById("ConCompAtt3").innerHTML =  "";
        }
                
    function visualizzatuttopass3() {
        document.getElementById("ConCompPass3").innerHTML =  "";
        } 
        </script>  
        
    <script type="text/javascript">
    function speciali(lettera) {
    document.uscita.verbo.value+= lettera;
    document.uscita.verbo.focus();
    };
    </script>
    </body>
 
    