You cannot speed it up.
With 30 lines, I assume you are connecting to 30 different URLs. 20 seconds is a good time to do this.
I also suggest that you use file_get_contents to extract the HTML code Or, if you need to , to learn how to use the response of the get_headers(); header get_headers();
If you want to speed up the process, just call more processes. Each of these will receive tot urls.
Adding
Also do not forget about the wonderful Zend_HTTP_Client(); which is very good for such a task
source share