$query = Query::queryServer($ip, $port); Error in this line is saying that there is no query something like that.
You'll probably need PMQuery virion for that since calling a static function from a class that doesn't exist isn't possible here is the link https://github.com/jasonwynn10/libpmquery
Are you serious? Instead of giving us the error, You give us the corrupted version of it from your biological cache, which apparently isn't working properly! Next time think how can you help us, so we could help you more efficiently in future.