PHP and iControl REST
Problem this snippet solves: PHP and iControl REST interfaces
Here are a couple of ways to use PHP and iControlREST (iCR). iCR is lighter-weight than iControl SOAP but is only supported on >= v1...
Updated Jun 06, 2023
Version 2.0PeteWhite
Employee
I work in the EMEA F5 Professional Services team. I generally deal Service Provider stuff because i come from that background ( 12 years working for Nokia Networks prior to joining F5 in 2013 )PeteWhite
Employee
Dec 13, 2018Updated to include the use of PATCH. Note that with class the modify method is updated to include the PATCH variable. Set this to true to use PATCH method. Remove it or set to false to use PUT. For function, I have added the PATCH variable to the other methods.
Example with class:
'This is a modified Virtual Server');
print_r($r->modify("/ltm/virtual/iCR_Test_VS",$description,true));
echo "Modify HTTP Return Code: $r->code\n";
Example with function:
'This is a modified Virtual Server');
print_r(iCR($handle,$username,$password,'PATCH',$url."/iCR_Test_VS",$description));
Let me know if you feel there are any other useful features required
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)