What language pray-tell are you using? You need to get the first part running... Don't worry about the 'long' way to do it, these won't help you code it better. I will give you an example I found after 1 google search for how to get machine name C#
The IP stuff? there is an entire class for all that fun stuff.. you need to jump into the pool and get wet.
Do a little bit of research, try writing some code (not copy/paste and break it and ask it to be fixed) and then you will get good feedback. You've given us nothing to help you with here.