Home > Articles > Programming > PHP

This chapter is from the book

This chapter is from the book

A Few Examples

So that's the theory. There wasn't much of it, but don't let that discourage you—it's possible to build some fairly powerful distributed applications using the simple functions described in the previous sections.

Information Delivery with WDDX and HTTP

This section discusses one of the most popular applications of this technology, using it to build a primitive push/pull engine for information delivery over the web. I'll be using a MySQL database as the data source, WDDX to represent the data, and PHP to perform the actual mechanics of the transaction.

Requirements

Let's assume the existence of a fictional corporation—XTI Inc.—that plans to start up an online subscription service offering access to share market data. XTI already has access to this information via an independent source, and its database of stocks and their prices is automatically updated every few minutes with the latest market data. XTI's plan is to offer customers access to this data, allowing them to use it on their own web sites in exchange for a monthly subscription fee.

Listing 5.16 has a slice of the MySQL table that holds the data we're interested in.

Listing 5.16 A Sample Recordset from the MySQL Table Holding Stock Market Information

+--------+--------+---------------------+
| symbol | price | timestamp      |
+--------+--------+---------------------+
| DTSJ  | 78.46 | 2001-11-22 12:20:57 |
| DNDS  |  5.89 | 2001-11-22 12:32:12 |
| MDNC  | 12.94 | 2001-11-22 12:21:34 |
| CAJD  | 543.89 | 2001-11-22 12:29:01 |
| WXYZ  | 123.67 | 2001-11-22 12:28:32 |
+--------+--------+---------------------+

All that is required is an interface to this database so that subscribers to the service can connect to the system and obtain prices for all or some stocks (keyed against each stock's unique four-character symbol).

Implementing these requirements via WDDX is fairly simple and can be accomplished via two simple scripts—one for each end of the connection. A WDDX server can be used at the XTI end of the connection to accept incoming client requests and deliver formatted WDDX packets to them. At the other end of the connection, WDDX-friendly clients can read these packets, decode them, and use them in whatever manner they desire.

Server

Let's implement the server first. Listing 5.17 has the complete code.

Listing 5.17 A Simple WDDX Server

<?php
// server.php - creates WDDX packet containing symbol, price and timestamp of
all/selected stock(s) // this script will run at the URL http://caesar.xtidomain.com/customers/server.php // open connection to database $connection = mysql_connect("mysql.xtidomain.com", "wddx", "secret") or die
("Unable to connect!"); mysql_select_db("db7643") or die ("Unable to select database!"); // get data $query = "SELECT symbol, price, timestamp FROM stocks"; // if a symbol is specified, modify query to get only that record if ($_GET['symbol']; { $symbol = $_GET['symbol']; $query .= " WHERE symbol = '$symbol'"; } $query .= " ORDER BY timestamp"; $result = mysql_query($query) or die ("Error in query: $query. " . mysql_error()); // if a result is returned if (mysql_num_rows($result) > 0) { // iterate through resultset while($row = mysql_fetch_row($result)) { // add data to $sPackage[] associative array // $sPackage is an array of the form ($symbol => array($price,
$timestamp), ... ) $sPackage[$row[0]] = array($row[1], $row[2]); } } // close database connection mysql_close($connection); // create WDDX packet echo wddx_serialize_value($sPackage); ?>

This may appear complex, but it's actually pretty simple. Because the data is stored in a database, the first task must be to extract it using standard MySQL query functions. The returned resultset may contain either a complete list of all stocks currently in the database with their prices or a single record corresponding to a client-specified stock symbol.

Next, this data must be packaged into a form that can be used by the client. For this example, I packaged the data into an associative array named $sPackage, whose every key corresponds to a stock symbol in the table. Every key is linked to a value, which is itself a two-element array containing the price and timestamp.

After all the records in the resultset are processed, the $sPackage array is serialized into a WDDX packet with wddx_serialize_value() and then printed as output.

Client

So, you now have a server that is capable of creating a WDDX packet from the results of a database query. All you need now is a client to connect to this server, retrieve the packet, and decode it into a native PHP array for use on an HTML page. Listing 5.18 contains the code for this client.

Listing 5.18 A Simple WDDX Client

<?php
// client.php - read and decode WDDX packet

// this script runs at http://brutus.clientdomain.com/client.php

// url of server page
$url = "http://caesar.xtidomain.com/customers/server.php";

// probably implement some sort of authentication mechanism here
// proceed further only if client is successfully authenticated

// read WDDX packet into string
$output = join ('', file($url));

// deserialize
$cPackage = wddx_deserialize($output);

?>
<html>
<head>
<basefont face="Arial">
<!-- reload page every two minutes for latest data -->
<meta http-equiv="refresh" content="120; URL= http://brutus.clientdomain.com/client.php">
</head>
<body>

<?
// if array contains data
if (sizeof($cPackage) > 0)
{
   // format and display
?>

   <table border="1" cellspacing="5" cellpadding="5">
   
   <tr>
   <td><b>Symbol</b></td>
   <td><b>Price (USD)</b></td>
   <td><b>Timestamp</b></td>
   </tr>
   
   <?php
   // iterate through array
   // key => symbol
   // value = array(price, timestamp)
   while (list($key, $value) = each($cPackage))
   {
      echo "<tr>\n";
      echo "<td>$key</td>\n";
      echo "<td>$value[0]</td>\n";
      echo "<td>$value[1]</td>\n";
      echo "</tr>\n";
   }
   
   ?>
   
   </table>
<?
}
else
{
   echo "No data available";
}
?>
</body>
</html>

The client is even simpler than the server. It connects to the specified server URL and authenticates itself. (I didn't go into the details of the authentication mechanism to be used, but it would probably be a host-username-password combination to be validated against XTI's customer database.) It then reads the WDDX packet printed by the server into an array with the file() function. This array is then converted into a string and deserialized into a native PHP associative array with wddx_deserialize().

After the data is decoded into a PHP associative array, a while loop can be used to iterate through it, identifying and displaying the important elements as a table.

Figure 5.1 shows what the resulting output looks like.

Figure 5.1 Retrieving stock prices from a database via a WDDX-based client-server system.

The beauty of this system is that the server and connecting clients are relatively independent of each other. As long as a client has the relevant permissions, and understands how to connect to the server and read the WDDX packet returned by it, it can massage and format the data per its own special requirements. To illustrate this, consider Listing 5.19, which demonstrates an alternative client—this one performing a "search" on the server for a user-specified stock symbol.

Listing 5.19 An Alternative WDDX Client

<?php
// client.php - read and decode WDDX packet

// this script runs at http://brutus.clientdomain.com/client.php

if(!$_POST['submit'])
{
?>

   <!-- search page -->
   <!-- lots of HTML layout code - snipped out -->
   
   <form action="<? echo $_SERVER['PHP_SELF']; ?>" method="post">
   Enter stock symbol:
   <input type="text" name="symbol" size="4" maxlength="4">
   <input type="submit" name="submit" value="Search">
   
   </form>
<?
}
else
{
   // perform a few error checks
   
   // sanitize search term

   // query server with symbol as parameter
   $symbol = $_POST['symbol'];
   $url = "http://caesar.xtidomain.com/customers/server.php?symbol=$symbol";
   
   // probably implement some sort of authentication mechanism here
   // proceed further only if client is successfully authenticated
   
   // read WDDX packet into string
   $output = join ('', file($url));
   
   // deserialize
   $cPackage = wddx_deserialize($output);
   
   // if any data in array
   if (sizeof($cPackage) > 0)
   {
      // format and display
      list($key, $value) = each($cPackage);
      echo "Current price for symbol $key is $value[0]";
   }
   else
   {
      echo "No data available";
   }
}
?>

This script consists of two parts:

  • The search form itself, which contains a text box for user input

  • The form processor, which connects to the content server with the user-specified stock symbol as parameter and massages the resulting WDDX output into easily readable HTML

Again, even though the two clients operate in two different ways (one displays a complete list of items, whereas the other uses a search term to filter down to one specific item), no change was required to the server or to the formatting of the WDDX packet.

Perl of Wisdom

It's not necessary that the WDDX clients described in Listings 5.18 and 5.19 be written in PHP. As discussed previously in this chapter, WDDX creates platform-independent data structures that can then be deserialized into native structures on the target platform. Consequently, it's possible for a WDDX client written in Perl or Python to connect to a WDDX server written in PHP, receive WDDX-compliant data packets, and use them within a script or program.

As an illustration, consider the following Perl port (see Listing 5.20) of the client described in Listing 5.18.

Listing 5.20 A Perl WDDX Client

#!/usr/bin/perl

# need this to read HTTP response
use LWP::UserAgent;

# need this to deserialize WDDX packets
use WDDX;

# instantiate client, connect and read response
$client = LWP::UserAgent->new;
my $req = HTTP::Request->new(GET => 'http://caesar.xtidomain.com/ _customers/server.php'); 
my $res = $client->request($req);

# response is good...
if ($res->is_success) 
{
   # deserialize resulting packet as hash and get reference
   my $wddx = new WDDX;
   $packet = $wddx->deserialize($res->content);
   $hashref = $packet->as_hashref;
   
   # get a list of keys (stock symbols) within the hash
   @keys = $packet->keys();

   # iterate through hash
   foreach $key (@keys)
   {
      # get a reference to the array [price, timestamp] for each key
      $arrayref = $$hashref{$key};

      # print data in colon-separated format
      print "$key:$$arrayref[0]:$$arrayref[1]\n";   
   }   
} 
# response is bad...
else 
{
   print "Error: bad connection!\n";
}

In this case, I used Perl's libwww module to connect to the WDDX server and read the resulting packet, and the WDDX module to deserialize it into a Perl hash reference. After the data is converted into a Perl-compliant structure, accessing and displaying the various elements is a snap.

Perl's WDDX.pm module is far more powerful than the WDDX module that ships with PHP 4.0, offering a wide array of different methods to simplify access to arrays, hashes, and recordsets. (Recordsets are not supported by PHP's WDDX module as of this writing, although support might become available in future versions.)

Remote Software Updates with WDDX and Socket Communication

The preceding section, "Information Delivery with WDDX and HTTP," demonstrated a WDDX client and server running over HTTP. As you might imagine, though, that's not the only way to use WDDX; this next example demonstrates WDDX-based data exchange using socket communication between a PHP server and client.

Requirements

In order to set the tone, let's again consider a fictional organization, Generic Corp (GCorp), which provides its customers with Linux-based software widgets. GCorp updates these widgets on a regular basis, and makes them available to paying customers via an online repository.

Now, GCorp has no fixed update schedule for these widgets—they're handled by different development teams, and are released to the online repository as installable files in RedHat Package Manager (RPM) format at irregular intervals. What GCorp wants is a way for every customer to automatically receive notification of software updates as and when they're released.

Most companies would send out email notification every time an update happened. But this is GCorp, and they like to make things complicated.

What GCorp has planned, therefore, is to have a WDDX server running on its web site, which automatically scans the repository and creates a WDDX packet containing information on the latest software versions available. This information can then be provided to any requesting client.

The client at the other end should have the necessary intelligence built into it to compare the version numbers received from the server with the version numbers of software currently installed on the local system. It may then automatically download and install the latest versions, or simply send notification to the system administrator about the update.

This is easily accomplished with WDDX; for variety, I'll perform the data exchange over TCP/IP sockets rather than HTTP.

Server

Let's begin with the server (see Listing 5.21), which opens up a socket and waits for connections from requesting clients.

Listing 5.21 A WDDX Server to Read and Communicate Version Information Over a TCP/IP Socket

<?php

// IMPORTANT! This script should not be run via your Web server!
// You will need to run it from the command line, 
// or as a service from inetd.conf

// set up some socket parameters
$ip = "127.0.0.1";
$port = 7890;

// area to look for updated files
$repository = "/tmp/updates/";


// start with socket creation
// get a handler
if (($socket = socket_create (AF_INET, SOCK_STREAM, 0)) < 0) 
{
   // this is fairly primitive error handling
   echo "Could not create socket\n";
}

// bind to the port
if (($ret = socket_bind ($socket, $ip, $port)) < 0) 
{
   echo "Could not bind to socket\n";
}

// start listening for connections
if (($ret = socket_listen ($socket, 7)) < 0) 
{
   echo "Could not create socket listener\n";
}

// if incoming connection, accept and spawn another socket 
// for data transfer
if (($child = socket_accept($socket)) < 0) 
{
   echo "Could not accept incoming connection\n";
}
    
if (!$input = socket_read ($child, 2)) 
{
   echo "Could not read input\n";
}
else 
{
   // at this stage, GCorp might want to perform authentication
   // using the input received by the client

   // assuming authentication succeeds...
   
   // look in the updates directory
   $dir = opendir($repository);
   while($file = readdir($dir))
   {
      // omit the "." and ".." directories
      if($file != "." && $file != "..")
      {
         $info = explode("-", $file);
         // create an array of associative arrays, one for each
file found // each associative array has the keys "name", "version"
and "size" $filelist[] = array("name" => $info[0], "version" => $info[1],
"size" => filesize($repository . $file)); } } closedir($dir); // serialize the array $output = wddx_serialize_value($filelist); // and send it to the client if(socket_write ($child, $output, strlen ($output)) < 0) { echo "Could not write WDDX packet"; } // clean up socket_close ($child); } socket_close ($socket); ?>

I will not get into the details of how the socket server is actually created—if you're interested, the PHP manual has extensive information on this—but instead focus on how the server obtains information on the updates available and serializes it into a WDDX packet.

The variable $repository sets up the location of the online software repository maintained by GCorp's QA team. When the socket server receives an incoming connection, it obtains a file list from the repository and creates an array whose every element corresponds to a file in the repository.

Every element of the array is itself an associative array that contains the keys name, version, and size, corresponding to the package name, version, and size, respectively. (Some of this information is obtained by parsing the filename with PHP's string functions.) This entire array is serialized with wddx_serialize_value() and written to the requesting client via the open socket.

I used PHP to implement the server here for convenience; however, it's just as easy to use Perl, Python, or Java (as discussed in the "Perl Of Wisdom" sidebar). Note also that socket programming support was added to PHP fairly recently and is, therefore, not yet completely stable.

Client

At the other end of the connection, a WDDX-compliant client has to deserialize the packet received from the server and then compare the information within it against the information it has on locally installed versions of the software. Listing 5.22 demonstrates one implementation of such a client.

Listing 5.22 A WDDX Client to Retrieve Version Information Over a TCP/ IP Socket

<?php


// IMPORTANT! This script should not be run via your Web server!
// You will need to run it manually from the command line, or via crontab

// set up some socket parameters
// this is the IP address of the socket server
$ip = "234.56.789.1";
$port = 7890;

// open a socket connection
$socket = fsockopen($ip, $port);

if (!$socket)
{
   echo "Could not open connection\n";
}
else
{
   // send a carriage return
   fwrite($socket, "\n");
   $packet = fgets($socket, 4096);
   // get and deserialize list of server packages
   $remote_packages = wddx_deserialize($packet);
   // close the socket
   fclose($socket);
   
   // make sure that the deserialized packet is an array
   if(!is_array($remote_packages))
   {
      $message= "Bad/unsupported data format received\n";
   }
   else
   {
      // now, start processing the received data
      for ($x=0; $x<sizeof($remote_packages); $x++)
      {
         // for each item in the array
         // check to see if a corresponding package is installed on
the local system $local_package = exec("rpm -qa | grep " .
$remote_packages[$x]['name']); // not there? that means it's a new package // dump it into the $new_packages[] array if ($local_package == "") { $new_packages[] = $remote_packages[$x]; } else { // present? check version // if a new version is available, // dump it into the $updated_packages[] array $arr = explode("-", $local_package); if ($arr[1] < $remote_packages[$x]['version']) { $updated_packages[] = $remote_packages[$x]; } } } // finally, put together a notification for the sysop // list of updates, with file size and version // an option here might be to initiate an automatic // download of the updates // RPM can be used to auto-install the downloaded updates if (sizeof($updated_packages) > 0) { $message .= "The following updates are available on our
server:\n"; for ($x=0; $x<sizeof($updated_packages); $x++) { $message .= "Package: ". $updated_packages[$x]['name']
. "\n"; $message .= "Version: " . $updated_packages[$x]['version']
. "\n"; $message .= "Size: " . $updated_packages[$x]['size']
. " bytes\n\n"; } } // ...and list of new packages, with file size and version if (sizeof($new_packages) > 0) { $message .= "The following new packages have been added to our
server (may require purchase):\n"; for ($x=0; $x<sizeof($new_packages); $x++) { $message .= "Package: ". $new_packages[$x]['name'] . "\n"; $message .= "Version: " . $new_packages[$x]['version']
. "\n"; $message .= "Size: " . $new_packages[$x]['size']
. " bytes\n\n"; } } // mail it out if(mail("root@localhost", "GCorp package updates for this week",
$message)) { echo "Operation successfully completed"; } else { echo "Error processing mail message"; } } } ?>

In this case, the client uses PHP's fsockopen() function to connect to the server and retrieve the WDDX packet. It then deserializes this packet into an array, and proceeds to iterate through it.

Because all GCorp packages are distributed in RPM format, it's fairly simple to obtain information on the currently installed versions of the files listed in the array with the rpm utility (standard on most Linux systems). These version numbers are compared with the version numbers of files on GCorp's server (remember the version key of each associative array?), and two new arrays are created:

  • $updated_packages, which contains a list of updated packages

  • $new_packages, which contains a list of packages available on the server but not installed locally

This information is then emailed to the system administrator via PHP's mail() function.

This isn't the only option, obviously; a variant of this might be for the client to automatically download and install the new software automatically. A more sophisticated client might even identify the new packages and send advertisements for, or information on, new software available, on a per-customer basis.

Command and Control

It's not advisable to run Listings 5.21 and 5.22 via your web server; rather, they should be run from the command line using the PHP binary.

For example, if you have a PHP binary located in /usr/local/bin/php, you would run the server script as the following:

$ /usr/local/bin/php -q /usr/local/work/bin/socket_server.php

The additional -q (quiet) parameter forces PHP to omit the Content-Type: text/html header that it usually sends prior to executing a script.

In case you don't have a PHP binary available, it's pretty easy to compile one. Just follow the instructions in Appendix A.

Although the socket server should always be active—which is why I suggest running it as a service managed by the inet daemon—the client should be set up to instantiate connections on a more irregular basis, either via manual intervention or UNIX cron.

Other Applications for WDDX

As the preceding examples demonstrated, WDDX makes it possible to exchange data between different sites and systems in a simple and elegant manner. Consequently, one of its more common applications involves acting as the vehicle for the syndication of frequently updated content over the web. Examples of areas in which WDDX can be used include the following:

News syndication services, which "push" the latest headlines, sports scores, stock and currency market information, and weather forecasts to connecting clients from a news database (for an example, check out http://www.moreover.com/, which offers news headlines in WDDX)

  • Ad-rotation services, which accept demographic data from requesting clients and return links to appropriate banner ads for display on the resulting web page

  • E-commerce agents, which browse different sites and return comparative pricing information for selected items

  • Software-update services, which automatically update remote systems with new software versions

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.

Overview


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information


To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information


Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children


This site is not directed to children under the age of 13.

Marketing


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information


If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information


Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents


California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure


Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact


Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice


We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020