This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
uphp:functions:fsockopen [2017/04/05 14:23] jeff |
uphp:functions:fsockopen [2021/09/13 05:57] (current) |
||
---|---|---|---|
Line 7: | Line 7: | ||
====Description==== | ====Description==== | ||
- | <well size=" | + | <well size=" |
- | <span style=" | + | <span style=" |
- | < | + | <span style=" |
<span style=" | <span style=" | ||
<span style=" | <span style=" | ||
Line 28: | Line 28: | ||
< | < | ||
- | < | + | < |
- | ====Return | + | ====Return |
- | Upon success it returns a file handle | + | < |
- | + | ||
- | If the attempt to open the connection fails it will return 0 | + | |
+ | The file handle may be used together with the other file functions that require a handle such as [[fgets()]], | ||
====Example==== | ====Example==== | ||
- | **Create a connection to www.example.com and display the response:** | + | ===Create a connection to www.example.com and display the response=== |
<code php> | <code php> | ||
Line 59: | Line 58: | ||
</ | </ | ||
- | ====See Also==== | + | ====Also |
[[fopen()]] - Open a file for reading or writing | [[fopen()]] - Open a file for reading or writing |