Web Client Programming with Perl-Chapter 6: Example LWP Programs-P1

Web Client Programming with Perl-Chapter 6: Example LWP Programs-P1

Web Client Programming with Perl-Chapter 6: Example LWP Programs-P1

... Chapter 6: Example LWP Programs-P1 This chapter presents LWP programs that are more robust and feature-rich than the examples shown in previous chapters. While Chapter 5, The LWP Library, ... teaching LWP and explained how LWP objects fit together, this chapter shows you some sample LWP programs with more user-friendly options and features. We present three broad categorie...

Ngày tải lên: 28/10/2013, 15:15

41 469 0
Web Client Programming with Perl-Chapter 6: Example LWP Programs-P2

Web Client Programming with Perl-Chapter 6: Example LWP Programs-P2

... non-HTTP references if ($print_not _web) { my %notweb = $site->not _web; print "\nReferenced non-HTTP links:\n"; foreach $url (keys %notweb) { print "notweb: $url\n"; } } # print ... $touched{$URL}=1 (URLs that have been visited) # %notweb $notweb{$URL}=1 if URL is non-HTTP # %badlist $badlist{$URL}="reason" (URLs that failed. Separated with \n) getopts(&apo...

Ngày tải lên: 28/10/2013, 15:15

34 329 0
Web Client Programming with Perl-Chapter 5: The LWP Library- P1

Web Client Programming with Perl-Chapter 5: The LWP Library- P1

... are useful for client programming. The LWP Module The LWP module, in the context of web clients, performs client requests over the network. There are 10 classes in all within the LWP module, as ... should now have an idea of how easy LWP can be. There are more examples at the end of this chapter, and the examples in Chapters See Example LWP Programs and all use LWP. Right...

Ngày tải lên: 24/10/2013, 08:15

27 401 0
Web Client Programming with Perl-Chapter 5: The LWP Library- P2

Web Client Programming with Perl-Chapter 5: The LWP Library- P2

... In the context of web client programming, you'll usually get an HTTP::Response object from LWP: :UserAgent and LWP: :RobotUA. If you plan to write extensions to LWP or a web server or proxy ... Chapter 5: The LWP Library- P2 HTTP::Response Responses from a web server are described by HTTP::Response objects. If LWP has problems fulfilling your request, it ... as a scalar....

Ngày tải lên: 24/10/2013, 08:15

32 439 0
Web Client Programming with Perl-Chapter 3: Learning HTTP- P3

Web Client Programming with Perl-Chapter 3: Learning HTTP- P3

... Transfer-Encoding header with the chunked parameter. When a client is involved in a client- pull/server-push operation, it may be possible that there is no end to the entity-body. For example, a client program ... If-Modified-Since, et al. To accommodate client- side caching of documents, the client can use the If- Modified-Since header with the GET method. When using this option...

Ngày tải lên: 17/10/2013, 19:15

27 522 0
Web Client Programming with Perl-Chapter 4: The Socket Library- P1

Web Client Programming with Perl-Chapter 4: The Socket Library- P1

... it's not fully compliant with the HTTP specs, the web server won't understand you! Perhaps your web client works with one web server but not another. Or maybe your web client works most of the ... any clients. You can now read and write to the filehandle to communicate with the client. In this example, the filehandle is FH. For example: print FH "HTTP/1.0 4...

Ngày tải lên: 20/10/2013, 10:15

26 491 0
Web Client Programming with Perl-Chapter 4: The Socket Library- P2

Web Client Programming with Perl-Chapter 4: The Socket Library- P2

... Socket; # include Socket module require 'tcp.pl'; # file with Open_TCP routine require &apos ;web. pl'; # file with parseURL routine use vars qw($opt_h $opt_H $opt_r $opt_d); use ... network connection close(F); } Shell Hypertext cat With hcat, one can easily retrieve documents from remote web servers. But there are times when a client request needs to be more complex...

Ngày tải lên: 20/10/2013, 10:15

26 463 0
Web Client Programming with Perl-Chapter 7: Graphical Examples with Perl/Tk- P1

Web Client Programming with Perl-Chapter 7: Graphical Examples with Perl/Tk- P1

... chapter, we show a few examples of Tk-based web clients, which go beyond the command-line interface that we've been using so far in this book:[1]  xword, a dictionary client  track, a ... program that will just prompt for the word and go look it up without all that extra hassle. Anyone familiar with the xwebster client for the X Window System will find xword to be vaguely...

Ngày tải lên: 07/11/2013, 09:15

14 465 0
Web Client Programming with Perl-Chapter 7: Graphical Examples with Perl/Tk- P2

Web Client Programming with Perl-Chapter 7: Graphical Examples with Perl/Tk- P2

... us every few minutes. For this example, we'll interact with the Federal Express tracking page. When you ship a package via FedEx, they keep track of it with a shipping number (also called ... call our function, do_search( ), with the URL we extracted from the HTML tag. Then we insert the text for the link into the text widget, and associate it with the tag we just built....

Ngày tải lên: 07/11/2013, 09:15

18 420 0
Web Client Programming with Perl-Chapter 7: Graphical Examples with Perl/Tk- P3

Web Client Programming with Perl-Chapter 7: Graphical Examples with Perl/Tk- P3

... Chapter 7: Graphical Examples with Perl/Tk- P3 Our destinations list is an almost exact copy of the list you'd see on the web page. For ease in using, we placed "U.S.A." ... rest of the code is repeated from Chapter 6: ## Package FedEx Written by Clinton Wong package FedEx; use HTTP::Request; use HTTP::Response; use LWP: :RobotUA; use HTTP::Status; sub new...

Ngày tải lên: 07/11/2013, 09:15

19 426 0
w