Members of the U.S. House of Representatives on Tuesday approved an anti-spyware bill that would make it illegal to place an unauthorized code on a computer and use it to obtain or transmit personal information or to impair the security protections on the system.