add daily mode to nikarayan command

This commit is contained in:
2025-05-12 16:23:39 +03:30
parent b025f6ff50
commit 439527306c
3 changed files with 14 additions and 12 deletions

View File

@@ -49,15 +49,14 @@ class NikarayanService
/**
* @throws SoapFault
*/
public function getRoadObservedProblemsByDate()
public function getRoadObservedProblemsByDate($time)
{
try {
$url = "https://riws.rmto.ir/WebServices/NRPTrafficStatus.asmx?wsdl";
$v = verta();
$month = $v->month < 10 ? '0' . $v->month : $v->month;
$day = $v->day < 10 ? '0' . $v->day : $v->day;
$date = $v->year . $month . $day;
$month = $time->month < 10 ? '0' . $time->month : $time->month;
$day = $time->day < 10 ? '0' . $time->day : $time->day;
$date = $time->year . $month . $day;
$soap_client = new SoapClient($url);
return $soap_client->Get_RoadObservedProblems_ByDate(array(