By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,890 Members | 1,039 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,890 IT Pros & Developers. It's quick & easy.

How to convert php codes to java

P: 3
<?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!!
Feb 21 '08 #1
Share this Question
Share on Google+
1 Reply


harshmaul
Expert 100+
P: 490
Hi,
What have you done so far, and where are you stuck?

there are many good java tutorials if you don't know how to code in it.
Feb 21 '08 #2

Post your reply

Sign in to post your reply or Sign up for a free account.