how to write a program to search the internet