How to convert php codes to java

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • angelyn
    New Member
    • Feb 2008
    • 3

    How to convert php codes to java

    <?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($content s,strpos($conte nts,$date_mark) +strlen($date_m ark),20);
    $variables_date = explode("<",$co ntents_date);

    $contents_val = substr($content s,strpos($conte nts,"PhP"),12);

    $variables_val = explode("<",$co ntents_val);
    $variables_val[0] = str_replace("Ph P","",$variable s_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!!
  • harshmaul
    Recognized Expert Contributor
    • Jul 2007
    • 490

    #2
    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.

    Comment

    Working...