GeRik wrote:ERROR on invalid id
Any HTTP status code of 4xx will cause most PHP file-reading functions to return false. Relying on this return value, however, will always cause PHP to throw E_WARNING level errors due to the "failed to open stream: HTTP request failed!" error.
A better, non-error producing method might be to use [man]cURL[/man] instead to retrieve the response. Using cURL will allow you to detect the 400 status code and/or "Invalid id" response without causing E_WARNING level errors in PHP, though it'll require a bit more overhead in terms of writing the code to do this.
GeRik wrote:on valid id no errors just
Video Dose NOT exsist
That's because you're trying to compare the return value of [man]simplexml_load_file/man to boolean true, which isn't what that function returns on success. A better solution would probably be to check that the return value isn't boolean false, which indicates that an error occurred. However, if you modify your code to use cURL as I suggested above, this solution probably wouldn't apply (since you'd be doing the error checking on the response obtained via cURL, not from the SimpleXML library).