<?php
if ($_GET['doretrieve'] == "atr")
{
$handle = fopen("http://www.bsp.gov.ph/keyrates.asp","r");
$contents = '';
while (!feof($handle))
{
$contents .= fread($handle, 8192);
}
fclose($handle);
$date_mark = "<div align=\"center\" class=\"style1\">";
$contents_date = substr($contents,strpos($contents,$date_mark)+strl en($date_mark),20);
$variables_date = explode("<",$contents_date);
$contents_val = substr($contents,strpos($contents,"PhP"),12);
$variables_val = explode("<",$contents_val);
$variables_val[0] = str_replace("PhP","",$variables_val[0]);
echo "&var_date=" . trim($variables_date[0]);
echo "&var_php=" . trim($variables_val[0]);
}
?>
that's the code for php and i want to know same process and runs in java.. please help with this matter.. thanks!!