Description

This function lists the virtual hosts that use a specified version of PHP.

Examples 




https://hostname.example.com:2087/cpsess##########/json-api/php_get_vhosts_by_version?api.version=1&version=ea-php56




https://hostname.example.com:2087/cpsess##########/xml-api/php_get_vhosts_by_version?api.version=1&version=ea-php56




whmapi1 php_get_vhosts_by_version version=ea-php56



{
   "metadata":{
      "reason":"OK",
      "version":1,
      "result":1,
      "command":"php_get_vhosts_by_version"
   },
   "data":{
      "vhosts":[
         "example.com",
         "new.example.com",
         "example1.com",
         "example2.com"
      ]
   }
}



<result>
    <metadata>
        <result>1</result>
        <version>1</version>
        <reason>OK</reason>
        <command>php_get_vhosts_by_version</command>
    </metadata>
    <data>
        <vhosts>new.example.com</vhosts>
        <vhosts>example.com</vhosts>
        <vhosts>example1.com</vhosts>
        <vhosts>example2.com</vhosts>
    </data>
</result>


Parameters  

Parameter
Type
Description
Possible values
Example
versionstring

Required

The name of an installed PHP package.

ea-php56

Returns

ReturnTypeDescriptionPossible valuesExample

vhosts

arrayAn array of the virtual hosts that use the specified PHP version.

Any valid virtual host name.

example.com