"함수 gethostbyname()"의 두 판 사이의 차이

 
2번째 줄: 2번째 줄:
==개요==
==개요==
;함수 getgostbyname()
;함수 getgostbyname()
==Go==
[[분류: Go]]
{{참고|Go gethostbyname()}}
<syntaxhighlight lang='go' run>
package main
import (
"fmt"
"net"
)
func main() {
ips, _ := net.LookupHost("example.com")
fmt.Println(ips)
}
</syntaxhighlight>


==PHP==
==PHP==

2023년 4월 8일 (토) 11:40 기준 최신판

1 개요[ | ]

함수 getgostbyname()

2 Go[ | ]

package main

import (
	"fmt"
	"net"
)

func main() {
	ips, _ := net.LookupHost("example.com")
	fmt.Println(ips)
}

3 PHP[ | ]

$ip = gethostbyname('example.com');
echo $ip;

4 Python[ | ]

import socket
ip = socket.gethostbyname('example.com')
print(ip)
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}