<img src="http://api.hostip.info/flag.php?ip=153.50.106.161" alt="IP Address Lookup">
Tested it via random ip 153.50.106.161 from ip test generator
About the OS, i found some useful tutorial via PHP/JSON (didn’t try it but they got live demo which i believe its working).
1
solved Get Os and Country flag from IP [closed]