You cannot do external IO in a consensus system.
(This is one reason why I think a lot of fancy contracts are best done using a quorum of external oracles, since you have no better security than that in anything that does external IO, and it's much more scalable (and works great in Bitcoin already))