POPEYE1716 Posted February 16, 2015 Share Posted February 16, 2015 Hello, So I need to convert PHP code to JSP/Java. I really don't understand PHP and would like an explanation as to what this code is doing. So I can convert it, any help would be great thank you it's only 4 lines of code sitemap.php Attached PHP file Quote Link to comment Share on other sites More sharing options...
CroNiX Posted February 17, 2015 Share Posted February 17, 2015 It's best to just post the code so here it is. <?php $xml_string = file_get_contents($_REQUEST['url']); $xml = simplexml_load_string($xml_string); $json = json_encode($xml); echo $json; ?> Quote Link to comment Share on other sites More sharing options...
Solution scootstah Posted February 17, 2015 Solution Share Posted February 17, 2015 Did you bother looking at the manual? I mean, one could probably guess with a reasonable amount of accuracy what this code does just by the name of the functions. Quote Link to comment Share on other sites More sharing options...
POPEYE1716 Posted February 17, 2015 Author Share Posted February 17, 2015 Thanks scootstah, this really helped. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.