If this were me doing it, I would first use only one server 'host' and get it working with just one. Once one of them works, you'll know the others will work.
As TFLan mentioned, we don't know what those other scripts require, as per the query result arrays you are creating. Your query result is an array of various numbers and somehow those other scripts need to know what those numbers are. We don't know how those other scripts work.