Forum Moderators: coopster

Message Too Old, No Replies

fopen() or fsockopen()

what's faster?

         

Zipper

4:27 am on Jul 23, 2004 (gmt 0)

10+ Year Member



forgive me for this one, but i just wrote a script which search multiple sites at the same time (external ofcourse). Just wanted to know what would be faster and efficient. I'm familiar with both functions, but never gave a thought as to which works better.

Also, do you have any idea as to what header data is being submitted when using fopen()? Thanks.

coopster

2:37 pm on Jul 23, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



They both open the same stream (http protocol), so I would think it's a toss-up. You would have to do some performance monitoring to be sure. I've never seen anything publicized, so to really figure it out you would probably have to track the processing through the source code.

Anyone else ever read anything on this?

To see the headers? One way would be to tell the fopen to get a script you have crafted to read the headers and display them to you :-)