fopen v fsockopen

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Post Reply
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

fopen v fsockopen

Post by malcolmboston »

tell me, im baffled, what are the advantages of each, ive read php.net
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Last I checked, you couldn't write to a remote page via fopen(). It only understands the URL wrapper protocols available through PHP while fsockopen() can communicate to nearly anything.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I'm sure they use the same streams code underneath. One has an interface for paths, the other for ports, but there is overlap (mainly due to the design of the Unix I/O system).
(#10850)
Post Reply