Getting Started with iControl and PHP

Problem this snippet solves:

After a few years of trial and error, I've managed to learned the ins and outs of using the iControl API with PHP. It certainly wasn't an easy process, as the information available was few and far between. So.... Here it is!!

iControl and PHP

For this first example, we will build a PHP script that will query an LTM for all of the pools and members along with their availability status and connection counts. The first step in the script is to create a few variables for storing the username, password, and LTM IP address. We will also define the necessary WSDL objects for interacting with iControl.

Code :

";
      echo "";

      $sn = $_SERVER['SCRIPT_NAME'];
      echo "
";?>
Published Mar 07, 2015
Version 1.0

Was this article helpful?

1 Comment

  • Can you please help me fix this error-

     

    Error: SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://ab.f5.com/iControl/iControlPortal.cgi?WSDL=LocalLB.Pool' : failed to load external entity "https://abc.f5.com/iControl/iControlPortal.cgi?WSDL=LocalLB.Pool"