I need to check the return value of a website output. In case of valid login details it returns a XML file and in case of invalid login details it just returns a string sayi
$result = simplexml_load_string ($data, 'SimpleXmlElement', LIBXML_NOERROR+LIBXML_ERR_FATAL+LIBXML_ERR_NONE); if (false == $result) echo 'error';