Server IP : 103.119.228.120 / Your IP : 18.188.101.251 Web Server : Apache System : Linux v8.techscape8.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : nobody ( 99) PHP Version : 5.6.40 Disable Function : shell_exec,symlink,system,exec,proc_get_status,proc_nice,proc_terminate,define_syslog_variables,syslog,openlog,closelog,escapeshellcmd,passthru,ocinum cols,ini_alter,leak,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dl,dll,myshellexec,proc_open,socket_bind,proc_close,escapeshellarg,parse_ini_filepopen,fpassthru,exec,passthru,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,popen,show_source,proc_nice,proc_terminate,proc_get_status,proc_close,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,dl,symlink,shell_exec,system,dl,passthru,escapeshellarg,escapeshellcmd,myshellexec,c99_buff_prepare,c99_sess_put,fpassthru,getdisfunc,fx29exec,fx29exec2,is_windows,disp_freespace,fx29sh_getupdate,fx29_buff_prepare,fx29_sess_put,fx29shexit,fx29fsearch,fx29ftpbrutecheck,fx29sh_tools,fx29sh_about,milw0rm,imagez,sh_name,myshellexec,checkproxyhost,dosyayicek,c99_buff_prepare,c99_sess_put,c99getsource,c99sh_getupdate,c99fsearch,c99shexit,view_perms,posix_getpwuid,posix_getgrgid,posix_kill,parse_perms,parsesort,view_perms_color,set_encoder_input,ls_setcheckboxall,ls_reverse_all,rsg_read,rsg_glob,selfURL,dispsecinfo,unix2DosTime,addFile,system,get_users,view_size,DirFiles,DirFilesWide,DirPrintHTMLHeaders,GetFilesTotal,GetTitles,GetTimeTotal,GetMatchesCount,GetFileMatchesCount,GetResultFiles,fs_copy_dir,fs_copy_obj,fs_move_dir,fs_move_obj,fs_rmdir,SearchText,getmicrotime MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/local/ssl/local/ssl/local/ssl/local/ssl/local/ssl/local/share/man/man3/ |
Upload File : |
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is turned on, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{ . if \nF \{ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Business::UPS 3" .TH Business::UPS 3 "2010-05-05" "perl v5.16.3" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Business::UPS \- A UPS Interface Module .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 1 \& use Business::UPS; \& \& my ($shipping,$ups_zone,$error) = getUPS(qw/GNDCOM 23606 23607 50/); \& $error and die "ERROR: $error\en"; \& print "Shipping is \e$$shipping\en"; \& print "UPS Zone is $ups_zone\en"; \& \& %track = UPStrack("z10192ixj29j39"); \& $track{error} and die "ERROR: $track{error}"; \& \& # \*(AqDelivered\*(Aq or \*(AqIn\-transit\*(Aq \& print "This package is $track{Current Status}\en"; .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" A way of sending four arguments to a module to get shipping charges that can be used in, say, a \s-1CGI.\s0 .SH "REQUIREMENTS" .IX Header "REQUIREMENTS" I've tried to keep this package to a minimum, so you'll need: .IP "\(bu" 4 Perl 5.003 or higher .IP "\(bu" 4 LWP::UserAgent Module .SH "ARGUMENTS for \fIgetUPS()\fP" .IX Header "ARGUMENTS for getUPS()" Call the subroutine with the following values: .PP .Vb 4 \& 1. Product code (see product\-codes.txt) \& 2. Origin Zip Code \& 3. Destination Zip Code \& 4. Weight of Package .Ve .PP and optionally: .PP .Vb 7 \& 5. Country Code, (see country\-codes.txt) \& 6. Rate Chart (drop\-off, pick\-up, etc \- see below) \& 6. Length, \& 7. Width, \& 8. Height, \& 9. Oversized (defined if oversized), and \& 10. COD (defined if C.O.D.) .Ve .IP "1." 4 Product Codes: .Sp .Vb 10 \& 1DM Next Day Air Early AM \& 1DML Next Day Air Early AM Letter \& 1DA Next Day Air \& 1DAL Next Day Air Letter \& 1DP Next Day Air Saver \& 1DPL Next Day Air Saver Letter \& 2DM 2nd Day Air A.M. \& 2DA 2nd Day Air \& 2DML 2nd Day Air A.M. Letter \& 2DAL 2nd Day Air Letter \& 3DS 3 Day Select \& GNDCOM Ground Commercial \& GNDRES Ground Residential \& XPR Worldwide Express \& XDM Worldwide Express Plus \& XPRL Worldwide Express Letter \& XDML Worldwide Express Plus Letter \& XPD Worldwide Expedited .Ve .Sp In an \s-1HTML \s0\*(L"option\*(R" input it might look like this: .Sp .Vb 10 \& <OPTION VALUE="1DM">Next Day Air Early AM \& <OPTION VALUE="1DML">Next Day Air Early AM Letter \& <OPTION SELECTED VALUE="1DA">Next Day Air \& <OPTION VALUE="1DAL">Next Day Air Letter \& <OPTION VALUE="1DP">Next Day Air Saver \& <OPTION VALUE="1DPL">Next Day Air Saver Letter \& <OPTION VALUE="2DM">2nd Day Air A.M. \& <OPTION VALUE="2DA">2nd Day Air \& <OPTION VALUE="2DML">2nd Day Air A.M. Letter \& <OPTION VALUE="2DAL">2nd Day Air Letter \& <OPTION VALUE="3DS">3 Day Select \& <OPTION VALUE="GNDCOM">Ground Commercial \& <OPTION VALUE="GNDRES">Ground Residential .Ve .IP "2." 4 Origin Zip(tm) Code .Sp Origin Zip Code as a number or string (\s-1NOT +4\s0 Format) .IP "3." 4 Destination Zip(tm) Code .Sp Destination Zip Code as a number or string (\s-1NOT +4\s0 Format) .IP "4." 4 Weight .Sp Weight of the package in pounds .IP "5." 4 Country .Sp Defaults to \s-1US\s0 .IP "6." 4 Rate Chart .Sp How does the package get to \s-1UPS:\s0 .Sp Can be one of the following: .Sp .Vb 5 \& Regular Daily Pickup \& On Call Air \& One Time Pickup \& Letter Center \& Customer Counter .Ve .SH "ARGUMENTS for \fIUPStrack()\fP" .IX Header "ARGUMENTS for UPStrack()" The tracking number. .PP .Vb 3 \& use Business::UPS; \& %t = UPStrack("1ZX29W290250xxxxxx"); \& print "This package is $track{\*(AqCurrent Status\*(Aq}\en"; .Ve .SH "RETURN VALUES" .IX Header "RETURN VALUES" .IP "\fIgetUPS()\fR" 4 .IX Item "getUPS()" .Vb 1 \& The raw LWP::UserAgent get returns a list with the following values: \& \& ## Desc Typical Value \& \-\- \-\-\-\-\-\-\-\-\-\-\-\-\-\-\- \-\-\-\-\-\-\-\-\-\-\-\-\- \& 0. Name of server: UPSOnLine3 \& 1. Product code: GNDCOM \& 2. Orig Postal: 23606 \& 3. Country: US \& 4. Dest Postal: 23607 \& 5. Country: US \& 6. Shipping Zone: 002 \& 7. Weight (lbs): 50 \& 8. Sub\-total Cost: 7.75 \& 9. Addt\*(Aql Chrgs: 0.00 \& 10. Total Cost: 7.75 .Ve .IP "\fIUPStrack()\fR" 4 .IX Item "UPStrack()" The hash that's returned is like the following: .Sp .Vb 10 \& \*(AqLast Updated\*(Aq => \*(AqJun 10 2003 12:28 P.M.\*(Aq \& \*(AqShipped On\*(Aq => \*(AqJune 9, 2003\*(Aq \& \*(AqSigned By\*(Aq => \*(AqSIGNATURE\*(Aq \& \*(AqShipped To\*(Aq => \*(AqLOS ANGELES,CA,US\*(Aq \& \*(AqScanning\*(Aq => HASH(0x146e0c) (more later...) \& \*(AqActivity Count\*(Aq => 5 \& \*(AqWeight\*(Aq => \*(Aq16.00 Lbs\*(Aq \& \*(AqCurrent Status\*(Aq => \*(AqDelivered\*(Aq \& \*(AqLocation\*(Aq => \*(AqRESIDENTIAL\*(Aq \& \*(AqService Type\*(Aq => \*(AqSTANDARD\*(Aq .Ve .Sp Notice the key 'Scanning' is a reference to a hash. (Which is a reference to another hash.) .Sp Scanning will contain a hash with keys 1 .. (Activity Count) Each of those values is another hash, holding a reference to an activity that's happened to an item. (See example for details) .Sp .Vb 9 \& %hash{Scanning}{1}{\*(Aqlocation\*(Aq} = \*(AqMESQUITE,TX,US\*(Aq; \& %hash{Scanning}{1}{\*(Aqdate\*(Aq} = \*(AqJun 10, 2003\*(Aq; \& %hash{Scanning}{1}{\*(Aqtime\*(Aq} = \*(Aq12:55 A.M.\*(Aq; \& %hash{Scanning}{1}{\*(Aqactivity\*(Aq} = \*(AqARRIVAL SCAN\*(Aq; \& %hash{Scanning}{2}{\*(Aqlocation\*(Aq} = \*(AqMESQUITE,TX,US\*(Aq; \& . \& . \& . \& %hash{Scanning}{x}{\*(Aqactivity\*(Aq} = \*(AqDELIVERED\*(Aq; .Ve .Sp \&\s-1NOTE:\s0 The items generally go in reverse chronological order. .SH "EXAMPLE" .IX Header "EXAMPLE" .IP "\fIgetUPS()\fR" 4 .IX Item "getUPS()" To retreive the shipping of a 'Ground Commercial' Package weighing 25lbs. sent from 23001 to 24002 this package would be called like this: .Sp .Vb 2 \& #!/usr/local/bin/perl \& use Business::UPS; \& \& my ($shipping,$ups_zone,$error) = getUPS(qw/GNDCOM 23001 23002 25/); \& $error and die "ERROR: $error\en"; \& print "Shipping is \e$$shipping\en"; \& print "UPS Zone is $ups_zone\en"; .Ve .IP "\fIUPStrack()\fR" 4 .IX Item "UPStrack()" .Vb 1 \& #!/usr/local/bin/perl \& \& use Business::UPS; \& \& %t = UPStrack("z10192ixj29j39"); \& $t{error} and die "ERROR: $t{error}"; \& \& print "This package is $t{\*(AqCurrent Status\*(Aq}\en"; # \*(AqDelivered\*(Aq or \& # \*(AqIn\-transit\*(Aq \& print "More info:\en"; \& foreach $key (keys %t) { \& print "KEY: $key = $t{$key}\en"; \& } \& \& %activities = %{$t{\*(AqScanning\*(Aq}}; \& \& print "Package activity:\en"; \& for (my $num = $t{\*(AqActivity Count\*(Aq}; $num > 0; $num\-\-) \& { \& print "\-\- ITEM $num \-\-\en"; \& foreach $newkey (keys %{$activities{$num}}) \& { \& print "$newkey: $activities{$num}{$newkey}\en"; \& } \& } .Ve .SH "BUGS" .IX Header "BUGS" Probably lots. Contact me if you find them. .SH "AUTHOR" .IX Header "AUTHOR" Justin Wheeler <upsmodule@datademons.com> .PP mailto:upsmodule@datademons.com .PP This software was originally written by Mark Solomon <mailto:msoloman@seva.net> (http://www.seva.net/~msolomon/) .PP \&\s-1NOTE: UPS\s0 is a registered trademark of United Parcel Service. Due to \s-1UPS\s0 licensing, using this software is not be endorsed by \s-1UPS,\s0 and may not be allowed. Use at your own risk. .SH "SEE ALSO" .IX Header "SEE ALSO" \&\fIperl\fR\|(1). .SH "POD ERRORS" .IX Header "POD ERRORS" Hey! \fBThe above document had some coding errors, which are explained below:\fR .IP "Around line 253:" 4 .IX Item "Around line 253:" =back doesn't take any parameters, but you said =back 4