TAILIEUCHUNG - Professional PHP Programming phần 6

Chúng tôi có thể giới thiệu khách truy cập bây giờ là một cách để truy vấn cơ sở dữ liệu whois. Nhưng những gì, nếu chúng ta muốn để cho phép khách truy cập để truy vấn cơ sở dữ liệu nhân? Ví dụ, nếu chúng ta muốn thực hiện các truy vấn cơ sở dữ liệu RIPE và cơ sở dữ liệu InterNIC. | Simpo PDF Merge and Split Unregistered Version - http data . fread fp 1000 fclose fp return data FORM INPUT TYPE HIDDEN NAME action VALUE query INPUT TYPE TEXT NAME query VALUE echo query INPUT TYPE SUBMIT VALUE OK FORM php server if action query data whois request server query echo Sent query to server. p echo Output p pre data pre p Extending the Frontend We can present visitors now a way to query a whois database. But what if we want to enable visitors to query multiply databases For example if we would like to make queries to the RIPE database and the InterNIC database. In the previous example you saw that we had hard-wired the hostname of the whois server. In this step we want to make this configurable. We use the same whois_request function again. Our HTML form changes a little bit to reflect our new choice FORM INPUT TYPE HIDDEN NAME action VALUE query SELECT NAME server OPTION value RIPE OPTION OPTION value InterNIC OPTION SELECT INPUT TYPE TEXT NAME query VALUE echo query INPUT TYPE SUBMIT VALUE OK TEAM FLY PRESENTS Simpo PDF Merge and Split Unregistered Version - http FORM We use the SELECT tag to build up a select box which shows several whois servers. We store the hostname as an option value in the HTML part. This helps us to keep the effort minimal to add new servers. Once the user hits the submit button the hostname of the server of his or her choice will be send to the server. PHP makes the data available as server variable. Thus we change our code to reflect this php server is already set by web server if action query data whois_request server query echo Sent query to server. p echo Output p pre data pre p You see this part became even simpler In the next step we will enhance the frontend more and build new functionality into it. Is my domain still available Today a popular way to utilize whois is to offer potential customers the ability to quickly lookup whether .

TỪ KHÓA LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.