Thanks for the answer. I will use this thread to describe the problem, while you answered to this thread already.
IPcamera with Foscam and MotionDetect