Hi Dan,
1) I think the CURL library is not intended for interactive use. If you are doing some form of monitoring, I suspect that you need interactivity - not just a single command sent and result recieved. If you could live with periodic log-in and log-out it may work. I'm on unfamiliar teratory here though and am speaking from a 5 minute glance at the CURL section of the PHP manual. YBW.
2) Simply use the function:
void set_time_limit (int seconds);
early on in your program. Passing zero as the argument will result in infinite execution time. This works only if you have safe mode off.
All the best,
Louis