public function updateNetwork($update) {
	  // check passed data
    if(!is_string($update)) {
      // nothing/non-string passed, raise an exception
		  throw new LinkedInException('LinkedIn->updateNetwork(): bad data passed, $update must be a non-zero length string.');
    }
    
    /**
     * Network update is not empty, wrap a cleaned version of it in xml.  
     * Network update rules:
     * 
     * 1) No HTML permitted except those found in _NETWORK_HTML constant
     * 2) Update cannot be longer than 140 characters.     
     */
    // get the user data
    $response = self::profile('~:(first-name,last-name,site-standard-profile-request)');
    if($response['success'] === TRUE) {
      /** 
       * We are converting response to usable data.  I'd use SimpleXML here, but
       * to keep the class self-contained, we will use a portable XML parsing
       * routine, self::xmlToArray.       
       */
      $person = self::xmlToArray($response['linkedin']);
      if($person === FALSE) {
        // bad xml data
        throw new LinkedInException('LinkedIn->updateNetwork(): LinkedIn returned bad XML data.');
      }
  		$fields = $person['person']['children'];
  
  		// prepare user data
  		$first_name   = trim($fields['first-name']['content']);
  		$last_name    = trim($fields['last-name']['content']);
  		$profile_url  = trim($fields['site-standard-profile-request']['children']['url']['content']);
  
      // create the network update 
      $update = trim(htmlspecialchars(strip_tags($update, self::_NETWORK_HTML)));
      if(strlen($update) > self::_NETWORK_LENGTH) {
        throw new LinkedInException('LinkedIn->share(): update length is too long - max length is ' . self::_NETWORK_LENGTH . ' characters.');
      }
      $user   = htmlspecialchars('<a href="' . $profile_url . '">' . $first_name . ' ' . $last_name . '</a>');
  		$data   = '<activity locale="en_US">
    				       <content-type>linkedin-html</content-type>
    				       <body>' . $user . ' ' . $update . '</body>
    				     </activity>';
  
      // send request
      $query    = self::_URL_API . '/v1/people/~/person-activities';
      $response = $this->fetch('POST', $query, $data);
      
      /**
  	   * Check for successful request (a 201 response from LinkedIn server) 
  	   * per the documentation linked in method comments above.
  	   */ 
      return $this->checkResponse(201, $response);
    } else {
      // profile retrieval failed
      throw new LinkedInException('LinkedIn->updateNetwork(): profile data could not be retrieved.');
    }
	}
public function updateNetwork($update) {
	  // check passed data
    if(!is_string($update)) {
      // nothing/non-string passed, raise an exception
		  throw new LinkedInException('LinkedIn->updateNetwork(): bad data passed, $update must be a non-zero length string.');
    }
    
    /**
     * Network update is not empty, wrap a cleaned version of it in xml.  
     * Network update rules:
     * 
     * 1) No HTML permitted except those found in _NETWORK_HTML constant
     * 2) Update cannot be longer than 140 characters.     
     */
    // get the user data
    $response = self::profile('~:(first-name,last-name,site-standard-profile-request)');
    if($response['success'] === TRUE) {
      /** 
       * We are converting response to usable data.  I'd use SimpleXML here, but
       * to keep the class self-contained, we will use a portable XML parsing
       * routine, self::xmlToArray.       
       */
      $person = self::xmlToArray($response['linkedin']);
      if($person === FALSE) {
        // bad xml data
        throw new LinkedInException('LinkedIn->updateNetwork(): LinkedIn returned bad XML data.');
      }
  		$fields = $person['person']['children'];
  
  		// prepare user data
  		$first_name   = trim($fields['first-name']['content']);
  		$last_name    = trim($fields['last-name']['content']);
  		$profile_url  = trim($fields['site-standard-profile-request']['children']['url']['content']);
  
      // create the network update 
      $update = trim(htmlspecialchars(strip_tags($update, self::_NETWORK_HTML)));
      if(strlen($update) > self::_NETWORK_LENGTH) {
        throw new LinkedInException('LinkedIn->share(): update length is too long - max length is ' . self::_NETWORK_LENGTH . ' characters.');
      }
      $user   = htmlspecialchars('<a href="' . $profile_url . '">' . $first_name . ' ' . $last_name . '</a>');
  		$data   = '<activity locale="en_US">
    				       <content-type>linkedin-html</content-type>
    				       <body>' . $user . ' ' . $update . '</body>
    				     </activity>';
  
      // send request
      $query    = self::_URL_API . '/v1/people/~/person-activities';
      $response = $this->fetch('POST', $query, $data);
      
      /**
  	   * Check for successful request (a 201 response from LinkedIn server) 
  	   * per the documentation linked in method comments above.
  	   */ 
      return $this->checkResponse(201, $response);
    } else {
      // profile retrieval failed
      throw new LinkedInException('LinkedIn->updateNetwork(): profile data could not be retrieved.');
    }
	}
public function updateNetwork ( $ update ) { // check passed data if ( ! is_string ( $ update ) ) { // nothing/non-string passed, raise an exception throw new LinkedInException ( 'LinkedIn->updateNetwork(): bad data passed, $update must be a non-zero length string.' ) ; } /**
     * Network update is not empty, wrap a cleaned version of it in xml.  
     * Network update rules:
     * 
     * 1) No HTML permitted except those found in _NETWORK_HTML constant
     * 2) Update cannot be longer than 140 characters.     
     */ // get the user data $ response = self :: profile ( '~:(first-name,last-name,site-standard-profile-request)' ) ; if ( $ response [ 'success' ] === TRUE ) { /** 
       * We are converting response to usable data.  I'd use SimpleXML here, but
       * to keep the class self-contained, we will use a portable XML parsing
       * routine, self::xmlToArray.       
       */ $ person = self :: xmlToArray ( $ response [ 'linkedin' ] ) ; if ( $ person === FALSE ) { // bad xml data throw new LinkedInException ( 'LinkedIn->updateNetwork(): LinkedIn returned bad XML data.' ) ; } $ fields = $ person [ 'person' ] [ 'children' ] ; // prepare user data $ first_name = trim ( $ fields [ 'first-name' ] [ 'content' ] ) ; $ last_name = trim ( $ fields [ 'last-name' ] [ 'content' ] ) ; $ profile_url = trim ( $ fields [ 'site-standard-profile-request' ] [ 'children' ] [ 'url' ] [ 'content' ] ) ; // create the network update  $ update = trim ( htmlspecialchars ( strip_tags ( $ update , self :: _NETWORK_HTML ) ) ) ; if ( strlen ( $ update ) > self :: _NETWORK_LENGTH ) { throw new LinkedInException ( 'LinkedIn->share(): update length is too long - max length is ' . self :: _NETWORK_LENGTH . ' characters.' ) ; } $ user = htmlspecialchars ( '<a href="' . $ profile_url . '">' . $ first_name . ' ' . $ last_name . '</a>' ) ; $ data = '<activity locale="en_US">
    				       <content-type>linkedin-html</content-type>
    				       <body>' . $ user . ' ' . $ update . '</body>
    				     </activity>' ; // send request $ query = self :: _URL_API . '/v1/people/~/person-activities' ; $ response = $ this -> fetch ( 'POST' , $ query , $ data ) ; /**
  	   * Check for successful request (a 201 response from LinkedIn server) 
  	   * per the documentation linked in method comments above.
  	   */ return $ this -> checkResponse ( 201 , $ response ) ; } else { // profile retrieval failed throw new LinkedInException ( 'LinkedIn->updateNetwork(): profile data could not be retrieved.' ) ; } }
Post network update.

Update the user's Linkedin network status. Full details from LinkedIn
on this functionality can be found here:

http://developer.linkedin.com/docs/DOC-1009
http://developer.linkedin.com/docs/DOC-1009#comment-1077

@param str $update
The network update.

@return arr
Array containing retrieval success, LinkedIn response.
Post network update .