Page 1 of 1

[SOLVED] file_get_contents vs fsockopen + fputs

Posted: Wed Aug 17, 2005 11:19 am
by anjanesh
Is there a difference in speed in using file_get_contents() vs fsockopen + fputs for GETting file contents ?

Thanks

Posted: Wed Aug 17, 2005 11:23 am
by feyd
why not try it and find out? :?

Posted: Wed Aug 17, 2005 11:31 am
by anjanesh
Im not able to find the difference for one url - to get a stats I need to pull a 1000 of atleast.
I just wanted to know if the mechanism is different or not. Or does file_get_contents actually use sockets in the backgorund to get the data ?

Posted: Wed Aug 17, 2005 11:36 am
by feyd
the url wrappers use sockets in the background to get it, yes.

Posted: Wed Aug 17, 2005 11:47 am
by anjanesh
Ah..Thanks for the info.