<?php
libxml_use_internal_errors(true);
if (file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html')) {
$datafile14 = file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html');
echo "Uploading Filename: https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html\n";
file_put_contents('raw_html/crystal.html',$datafile14);
//chmod("raw_html/crystal.html",0777);
echo "data has been uploaded!";
}
$html = file_get_contents('raw_html/crystal.html');
/*** a new dom object ***/
$dom = new domDocument;
/*** load the html into the object ***/
$dom->loadHTML($html);
if(!$dom)
{
echo "you've got a problem...!";
}
/*** discard white space ***/
$dom->preserveWhiteSpace = false;
/*** the table by its tag name ***/
$tables = $dom->getElementsByTagName('table');
/*** get all rows from the table ***/
$rows = $tables->item(0)->getElementsByTagName('tr');
/*** loop over the table rows ***/
foreach ($rows as $row) {
/*** get each column by tag name ***/
$cols = $row->getElementsByTagName('td');
$enddate = $cols->item[0]->nodeValue;
$num_days = $cols->item[1]->nodeValue;
$area = $cols->item[2]->nodeValue;
$mmepool = $cols->item[3]->nodeValue;
$region = $cols->item[4]->nodeValue;
$vendor = $cols->item[5]->nodeValue;
$volte_ia_pcnt = $cols->item[6]->nodeValue;
$volte_lc_pcnt = $cols->item[7]->nodeValue;
$sip_mou = $cols->item[8]->nodeValue;
$volte_qci1_setup_failure_pcnt = $cols->item[9]->nodeValue;
$volte_qci1_setup_failures = $cols->item[10]->nodeValue;
$volte_qci1_setup_attempts = $cols->item[11]->nodeValue;
$qci5_setup_failure_pcnt = $cols->item[12]->nodeValue;
$qci5_setup_failures = $cols->item[13]->nodeValue;
$qci5_setup_attempts = $cols->item[14]->nodeValue;
$seer_pcnt = $cols->item[15]->nodeValue;
$seer_sip_ntwk_eff_calls = $cols->item[16]->nodeValue;
$seer_sip_call_attempts = $cols->item[17]->nodeValue;
$rrc_setup_failure_pcnt = $cols->item[18]->nodeValue;
$rrc_setup_attempts = $cols->item[19]->nodeValue;
$rrc_setup_failures = $cols->item[20]->nodeValue;
$volte_qci1_drop_pcnt = $cols->item[21]->nodeValue;
$volte_qci1_drops = $cols->item[22]->nodeValue;
$volte_qci1_established_calls = $cols->item[23]->nodeValue;
$qci5_bearer_drop_pcnt = $cols->item[24]->nodeValue;
$qci5_bearer_drops = $cols->item[25]->nodeValue;
$qci5_bearer_estab_calls = $cols->item[26]->nodeValue;
$volte_avg_mos = $cols->item[27]->nodeValue;
$volte_mos_numerator = $cols->item[28]->nodeValue;
$volte_mos_denominator = $cols->item[19]->nodeValue;
$volte_pdcp_dl_volume_mb = $cols->item[30]->nodeValue;
$volte_dl_volume_pcnt = $cols->item[31]->nodeValue;
$lte_pdcp_dl_volume_mb = $cols->item[32]->nodeValue;
$x7x24_volte_pdcp_dl_volume_mb = $cols->item[33]->nodeValue;
$x7x24_volte_dl_volume_pcnt = $cols->item[34]->nodeValue;
$x7x24_lte_pdcp_dl_volume_mb = $cols->item[35]->nodeValue;
$volte_pdcp_ul_volume_mb = $cols->item[36]->nodeValue;
$volte_ul_volume_pcnt = $cols->item[37]->nodeValue;
$lte_pdcp_ul_volume_mb = $cols->item[38]->nodeValue;
$x7x24_days = $cols->item[39]->nodeValue;
}
echo $x7x24_days;
?>
ASKER
$html = file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html');
ASKER
ASKER
<table border="1">
<tr><th>EndDate</th><th>Num Days</th><th>Area</th><th>MMEPool</th><th>Region</th><th>Vendor</th><th>VoLTE IA%</th><th>VoLTE LC%</th><th>SIP MOU</th><th>VoLTE QCI1 Setup Failure%</th><th>VoLTE QCI1 Setup Failures</th><th>VoLTE QCI1 Setup Attempts</th><th>QCI5 Setup Failure%</th><th>QCI5 Setup Failures</th><th>QCI5 Setup Attempts</th><th>SEER%</th><th>SEER SIP Ntwk Eff Calls</th><th>SEER SIP Call Attempts</th><th>RRC Setup Failure%</th><th>RRC Setup Attempts</th><th>RRC Setup Failures</th><th>VoLTE QCI1 Drop%</th><th>VoLTE QCI1 Drops</th><th>VoLTE QCI1 Established Calls</th><th>QCI5 Bearer Drop%</th><th>QCI5 Bearer Drops</th><th>QCI5 Bearer Estab Calls</th><th>VoLTE Avg MOS</th><th>VoLTE MOS Numerator</th><th>VoLTE MOS Denominator</th><th>VoLTE ACQ%</th><th>VoLTE Acceptable MOS Count</th><th>VoLTE Total MOS Count</th><th>VoLTE PDCP DL Volume MB</th><th>VoLTE DL Volume%</th><th>LTE PDCP DL Volume MB</th><th>VoLTE PDCP UL Volume MB</th><th>VoLTE UL Volume%</th><th>LTE PDCP UL Volume MB</th><th>SIP Call Drop%</th><th>SIP Call Drops</th><th>SIP Call Answers</th></tr>
ASKER
<?php
libxml_use_internal_errors(true);
if (file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html')) {
$datafile14 = file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html');
echo "Uploading Filename: https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html\n";
file_put_contents('raw_html/crystal.html',$datafile14);
//chmod("raw_html/crystal.html",0777);
echo "data has been uploaded!";
}
$html = file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html');
/*** a new dom object ***/
$dom = new domDocument;
/*** load the html into the object ***/
$dom->loadHTML($html);
if(!$dom)
{
echo "you've got a problem...!";
}
/*** discard white space ***/
$dom->preserveWhiteSpace = false;
/*** the table by its tag name ***/
$tables = $dom->getElementsByTagName('table');
/*** get all rows from the table ***/
$rows = $tables->item(0)->getElementsByTagName('tr');
/*** loop over the table rows ***/
foreach ($rows as $row) {
/*** get each column by tag name ***/
$cols = $row->getElementsByTagName('td');
if($cols)
{
$enddate = $cols->item(0)->nodeValue;
echo $enddate;
}
?>
<?php
libxml_use_internal_errors(true);
$html = file_get_contents('test.html');
/*** a new dom object ***/
$dom = new domDocument;
/*** load the html into the object ***/
$dom->loadHTML($html);
if(!$dom)
{
echo "you've got a problem...!";
}
/*** discard white space ***/
$dom->preserveWhiteSpace = false;
/*** the table by its tag name ***/
$tables = $dom->getElementsByTagName('table')->item(0);
/*** get all rows from the table ***/
foreach($tables->getElementsByTagName('tr') as $row)
{
$cols = $row->getElementsByTagName('td');
$enddate = $cols->item(0)->nodeValue;
$num_days = $cols->item(1)->nodeValue;
$area = $cols->item(2)->nodeValue;
$mmepool = $cols->item(3)->nodeValue;
$region = $cols->item(4)->nodeValue;
$vendor = $cols->item(5)->nodeValue;
$volte_ia_pcnt = $cols->item(6)->nodeValue;
$volte_lc_pcnt = $cols->item(7)->nodeValue;
$sip_mou = $cols->item(8)->nodeValue;
$volte_qci1_setup_failure_pcnt = $cols->item(9)->nodeValue;
$volte_qci1_setup_failures = $cols->item(10)->nodeValue;
$volte_qci1_setup_attempts = $cols->item(11)->nodeValue;
$qci5_setup_failure_pcnt = $cols->item(12)->nodeValue;
$qci5_setup_failures = $cols->item(13)->nodeValue;
$qci5_setup_attempts = $cols->item(14)->nodeValue;
$seer_pcnt = $cols->item(15)->nodeValue;
$seer_sip_ntwk_eff_calls = $cols->item(16)->nodeValue;
$seer_sip_call_attempts = $cols->item(17)->nodeValue;
$rrc_setup_failure_pcnt = $cols->item(18)->nodeValue;
$rrc_setup_attempts = $cols->item(19)->nodeValue;
$rrc_setup_failures = $cols->item(20)->nodeValue;
$volte_qci1_drop_pcnt = $cols->item(21)->nodeValue;
$volte_qci1_drops = $cols->item(22)->nodeValue;
$volte_qci1_established_calls = $cols->item(23)->nodeValue;
$qci5_bearer_drop_pcnt = $cols->item(24)->nodeValue;
$qci5_bearer_drops = $cols->item(25)->nodeValue;
$qci5_bearer_estab_calls = $cols->item(26)->nodeValue;
$volte_avg_mos = $cols->item(27)->nodeValue;
$volte_mos_numerator = $cols->item(28)->nodeValue;
$volte_mos_denominator = $cols->item(19)->nodeValue;
$volte_pdcp_dl_volume_mb = $cols->item(30)->nodeValue;
$volte_dl_volume_pcnt = $cols->item(31)->nodeValue;
$lte_pdcp_dl_volume_mb = $cols->item(32)->nodeValue;
$x7x24_volte_pdcp_dl_volume_mb = $cols->item(33)->nodeValue;
$x7x24_volte_dl_volume_pcnt = $cols->item(34)->nodeValue;
$x7x24_lte_pdcp_dl_volume_mb = $cols->item(35)->nodeValue;
$volte_pdcp_ul_volume_mb = $cols->item(36)->nodeValue;
$volte_ul_volume_pcnt = $cols->item(37)->nodeValue;
$lte_pdcp_ul_volume_mb = $cols->item(38)->nodeValue;
$x7x24_days = $cols->item(39)->nodeValue;
}
echo $x7x24_days;
?>
Notice: Trying to get property of non-object in /opt/lampp/htdocs/crystal/test.php on line 39
12/10/201412/10/201412/10/201412/10/ 201412/10/ 201412/10/ 2014
ASKER
libxml_use_internal_errors(true);
if (file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html')) {
$datafile14 = file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html');
echo "Uploading Filename: https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html\n";
file_put_contents('raw_html/crystal.html',$datafile14);
//chmod("raw_html/crystal.html",0777);
echo "data has been uploaded!";
}
$html = file_get_contents('https://ncws.vh.eng.vzwcorp.com:8080/reports/delvane/volte_7_day.html');
/*** a new dom object ***/
$dom = new domDocument;
/*** load the html into the object ***/
$dom->loadHTML($html);
if(!$dom)
{
echo "you've got a problem...!";
}
/*** discard white space ***/
$dom->preserveWhiteSpace = false;
/*** the table by its tag name ***/
$tables = $dom->getElementsByTagName('table')->item(0);
/*** get all rows from the table ***/
foreach($tables->getElementsByTagName('tr') as $row)
{
$cols = $row->getElementsByTagName('td');
if(!$cols=="")
{
$x7x24_days = $cols->item(39)->nodeValue;
}
}
echo $x7x24_days;
ASKER
ASKER
ASKER
PHP is a widely-used server-side scripting language especially suited for web development, powering tens of millions of sites from Facebook to personal WordPress blogs. PHP is often paired with the MySQL relational database, but includes support for most other mainstream databases. By utilizing different Server APIs, PHP can work on many different web servers as a server-side scripting language.
TRUSTED BY