User Tools

Site Tools


uphp:functions:fsockopen

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

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="sm"><html><span style="font-size:125%;color:green">int +<well size="sm"><html> 
-<span style="color:black"></html>[[fsockopen]] +<span style="font-size:125%;color:green">int 
-<html>(+<span style="color:black">fsockopen (
 <span style="color:green">string <span style="color:green">string
 <span style="color:blue">$host<span style="color:black">, <span style="color:blue">$host<span style="color:black">,
Line 28: Line 28:
 <html><b><span style="color:blue">$port<span style="color:black"></b></html>:  Port number <html><b><span style="color:blue">$port<span style="color:black"></b></html>:  Port number
  
-<html><b><span style="color:blue">$timeout<span style="color:black"></b></html>:  Connection timeout in seconds, optional (if not specified the system wide setting in [[os:config:uphp.ini]] will be used).+<html><b><span style="color:blue">$timeout<span style="color:black"></b></html>:  Connection timeout in seconds, optional (if not specified the system wide setting in [[software:os:config:uphp.ini]] will be used).
  
-====Return Value====+====Return Values====
  
-Upon success it returns a file handle which may be used together with the other file functions that require a handle such as [[fgets()]][[fwrite()]], [[fclose()]] and [[feof()]] +<html><b><span style="color:green">Integer<span style="color:black"></b></html>:  File handle, or 0 if the attempt to open the connection fails
- +
-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()]], [[fwrite()]], [[fclose()]] and [[feof()]]
  
 ====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:
 </code> </code>
  
-====See Also====+====Also See====
  
 [[fopen()]] - Open a file for reading or writing [[fopen()]] - Open a file for reading or writing
uphp/functions/fsockopen.1491402203.txt.gz · Last modified: 2021/09/13 05:56 (external edit)