Files
html/api/_tmp_s95_orph.php
OpusWIRE fb41795eb4
Some checks failed
WEVAL NonReg / nonreg (push) Has been cancelled
V94 END auto agent sync
2026-04-20 14:24:51 +02:00

13 lines
545 B
PHP

<?php
// Run on S95 via sentinel
$cmd = 'sudo -u postgres psql -d admin -tAc "SELECT COUNT(*) FROM crm.contacts WHERE company_id IS NULL"';
echo "Cmd: $cmd\n";
$ch = curl_init("https://wevads.weval-consulting.com/api/sentinel-brain.php");
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query(["action"=>"exec","cmd"=>$cmd]));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_TIMEOUT, 15);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
$r = curl_exec($ch);
echo "Response: $r\n";