查看完整版本: php网络函数

php 2007-7-25 09:03

php网络函数

[color=#000000][color=#0000cc]<[/color][color=#0000cc]?[/color][color=#0000ff]php[/color]
[color=#0000ff]if[/color] [color=#0000cc]([/color][color=#0000cc]![/color][color=#0000ff]$[/color][color=#008080]fp[/color] [color=#0000cc]=[/color] [color=#ff0000]fsockopen[/color][color=#0000cc]([/color][color=#ff00ff]"mail.atyu30.com"[/color][color=#0000cc],[/color]25[color=#0000cc])[/color][color=#0000cc])[/color]
[color=#0000cc]{[/color]
[color=#ff0000]echo[/color] [color=#ff00ff]"无法连接mail server!"[/color][color=#0000cc];[/color]
[color=#ff0000]echo[/color] [color=#ff00ff]"Domain Name of [10.0.0.100]:"[/color][color=#0000cc];[/color]
[color=#ff0000]echo[/color] [color=#ff0000]gethostbyaddr[/color][color=#0000cc]([/color][color=#ff00ff]"10.0.0.100"[/color][color=#0000cc])[/color][color=#0000cc];[/color][color=#ff9900]//返回"atyu30.com",返回某个IP的Domain Name ,若执行失败则返回原来的IP
[/color]
[color=#ff0000]echo[/color] [color=#ff00ff]"IP of [www.atyu30.com]:"[/color][color=#0000cc];[/color]
[color=#ff0000]echo[/color] gethosbyname[color=#0000cc]([/color][color=magenta]"www.atyu30.com"[/color][color=#0000cc])[/color][color=#0000cc];[/color][color=#ff9900]//返回10.0.0.100,返回某个Domain Name 的IP
[/color]
[color=#0000cc]}[/color]

[color=#0000cc]?[/color][color=#0000cc]>[/color][/color]

[[i] 本帖最后由 php 于 2007-7-25 09:04 编辑 [/i]]
页: [1]
查看完整版本: php网络函数