Exponential Basic 2.4.0.1 Exponential Basic CMS — PHP Class Reference

Public Member Functions | Public Attributes | List of all members
upsRate Class Reference

## Public Member Functions
| upsRate ($szip, $sstate, $scountry)
| upsRateNames ()
| construct_request_xml ()
| rate ($service='', $tzip, $tstate='', $tcountry='US', $weight, $length, $height, $width, $residential=0, $packagetype='02')
| __runCurl ()
| __get_xml_array ($values, &$i)
| _get_xml_array ($data)
| get_rates ()

## Public Attributes
| $request
| $userid
| $passwd
| $accesskey
| $upstool
| $service
| $pickuptype ='01'
| $residential
| $s_zip
| $s_state
| $s_country
| $t_zip
| $t_state
| $t_country
| $package_type
| $weight
| $length
| $width
| $height
| $error =0
| $errormsg
| $xmlarray = array()
| $xmlreturndata = ""

## Detailed Description

Definition at line 92 of file ezupsxml.php.

## Member Function Documentation

## ◆ __get_xml_array()

upsRate::__get_xml_array | ( |  | $values,
|  | & | $i
| ) |  |

__get_xml_array($values, &$i)

This is adds the contents of the return xml into the array for easier processing.

@access private

Parameters

  array | $values | this is the xml data in an array
  int | $i | this is the current location in the array

Returns
  Array

Definition at line 347 of file ezupsxml.php.

References $i, $name, $size, and $values.

Referenced by _get_xml_array().

## ◆ __runCurl()

upsRate::__runCurl | ( |  | ) |

__runCurl()

This is processes the curl command.

@access private

set the post-to url (do not include the ?query+string here!)

Header control

tell it to make a POST, not a GET

put the querystring here starting with "?"

This allows the output to be set into a variable $xyz

some php version cause error with curl without this line

execute the curl session and return the output to a variable $xyz

close the curl session

Definition at line 311 of file ezupsxml.php.

References $ini, and construct_request_xml().

Referenced by rate().

## ◆ _get_xml_array()

upsRate::_get_xml_array | ( |  | $data | ) |

_get_xml_array($data)

This is adds the contents of the return xml into the array for easier processing.

@access private

Parameters

  string | $data | this is the string of the xml data

Returns
  Array

Definition at line 401 of file ezupsxml.php.

References $i, $index, $name, $values, and __get_xml_array().

Referenced by rate().

## ◆ construct_request_xml()

upsRate::construct_request_xml | ( |  | ) |

Definition at line 188 of file ezupsxml.php.

References $ini.

Referenced by __runCurl().

## ◆ get_rates()

upsRate::get_rates | ( |  | ) |

Definition at line 422 of file ezupsxml.php.

References $current, $i, and $values.

Referenced by rate().

## ◆ rate()

upsRate::rate | ( |  | $service = `''`,
|  |  | $tzip,
|  |  | $tstate = `''`,
|  |  | $tcountry = `'US'`,
|  |  | $weight,
|  |  | $length,
|  |  | $height,
|  |  | $width,
|  |  | $residential = `0`,
|  |  | $packagetype = `'02'`
| ) |  |

Definition at line 263 of file ezupsxml.php.

References $height, $length, $residential, $service, $values, $weight, $width, __runCurl(), _get_xml_array(), error(), and get_rates().

## ◆ upsRate()

upsRate::upsRate | ( |  | $szip,
|  |  | $sstate,
|  |  | $scountry
| ) |  |

Definition at line 148 of file ezupsxml.php.

## ◆ upsRateNames()

upsRate::upsRateNames | ( |  | ) |

Definition at line 161 of file ezupsxml.php.

References $ups_service.

## Member Data Documentation

## ◆ $accesskey

upsRate::$accesskey

Definition at line 104 of file ezupsxml.php.

## ◆ $error

upsRate::$error =0

Definition at line 140 of file ezupsxml.php.

## ◆ $errormsg

upsRate::$errormsg

Definition at line 141 of file ezupsxml.php.

## ◆ $height

upsRate::$height

Definition at line 138 of file ezupsxml.php.

Referenced by rate().

## ◆ $length

upsRate::$length

Definition at line 136 of file ezupsxml.php.

Referenced by rate().

## ◆ $package_type

upsRate::$package_type

Definition at line 133 of file ezupsxml.php.

## ◆ $passwd

upsRate::$passwd

Definition at line 103 of file ezupsxml.php.

## ◆ $pickuptype

upsRate::$pickuptype ='01'

Definition at line 108 of file ezupsxml.php.

## ◆ $request

upsRate::$request

Definition at line 100 of file ezupsxml.php.

## ◆ $residential

upsRate::$residential

Definition at line 120 of file ezupsxml.php.

Referenced by rate().

## ◆ $s_country

upsRate::$s_country

Definition at line 125 of file ezupsxml.php.

## ◆ $s_state

upsRate::$s_state

Definition at line 124 of file ezupsxml.php.

## ◆ $s_zip

upsRate::$s_zip

Definition at line 123 of file ezupsxml.php.

## ◆ $service

upsRate::$service

Definition at line 106 of file ezupsxml.php.

Referenced by rate().

## ◆ $t_country

upsRate::$t_country

Definition at line 130 of file ezupsxml.php.

## ◆ $t_state

upsRate::$t_state

Definition at line 129 of file ezupsxml.php.

## ◆ $t_zip

upsRate::$t_zip

Definition at line 128 of file ezupsxml.php.

## ◆ $upstool

upsRate::$upstool

Definition at line 105 of file ezupsxml.php.

## ◆ $userid

upsRate::$userid

Definition at line 102 of file ezupsxml.php.

## ◆ $weight

upsRate::$weight

Definition at line 134 of file ezupsxml.php.

Referenced by rate().

## ◆ $width

upsRate::$width

Definition at line 137 of file ezupsxml.php.

Referenced by rate().

## ◆ $xmlarray

upsRate::$xmlarray = array()

Definition at line 142 of file ezupsxml.php.

## ◆ $xmlreturndata

upsRate::$xmlreturndata = ""

Definition at line 143 of file ezupsxml.php.

The documentation for this class was generated from the following file:

- ezupsxml.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.