<?php
function req($method,$url,$headers=[],$body=null){$ch=curl_init($url);curl_setopt_array($ch,[CURLOPT_RETURNTRANSFER=>true,CURLOPT_CUSTOMREQUEST=>$method,CURLOPT_HEADER=>true,CURLOPT_TIMEOUT=>30]);if($body!==null){$raw=is_string($body)?$body:json_encode($body,JSON_UNESCAPED_SLASHES);curl_setopt($ch,CURLOPT_POSTFIELDS,$raw);$headers[]='Content-Type: application/json';}curl_setopt($ch,CURLOPT_HTTPHEADER,$headers);$res=curl_exec($ch);$err=curl_error($ch);$code=curl_getinfo($ch,CURLINFO_RESPONSE_CODE);$hs=curl_getinfo($ch,CURLINFO_HEADER_SIZE);curl_close($ch);$content=$res===false?'':substr($res,$hs);return ['code'=>$code,'error'=>$err,'body'=>$content,'json'=>json_decode($content,true)];}
$r=req('GET','http://127.0.0.1:8001/api/health/ready',['Accept: application/json']);echo "laravel={$r['code']} {$r['body']}\n";
$r=req('GET','http://127.0.0.1:8787/health',['Accept: application/json']);echo "signer={$r['code']} {$r['body']}\n";