Uname:
Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software:
Apache
PHP version:
7.4.33 [ PHP INFO ] PHP os:
Linux
Server Ip:
54.36.31.145
Your Ip:
216.73.216.182
User:
homesquasz (91404) | Group:
users (100)
Safe Mode:
OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl
<?php
$url = 'http://DB-GHX.Groupe-Hammami.com:7048/GP_HAMMAMI/ODataV4/Company(\'005-SCPC\')/P_SoldeCongeEmployeeW?$format=json';
$ch = curl_init($url); // such as http://example.com/example.xml
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPAUTH, CURLAUTH_ANY);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
curl_setopt($ch, CURLOPT_USERPWD, 'admintnmzid:GH2019*');
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: */*',
'If-Match: *'
));
curl_setopt($ch, CURLOPT_TIMEOUT, 100);
curl_setopt($ch, CURLOPT_HEADER, 0);
$data = curl_exec($ch);
curl_close($ch);
$service = json_decode($data);
//print_r($service ->value);
foreach($service ->value as $item)
{
$row=$this->db->query("select * from users where matricule='".$item->No."'");
if($row->num-rows()>0)
{
$perso=$row->result();
$this->db->where("users_id",$perso[0]->id);
$saved=array("soldeconge"=>$item->Solde_de_conge);
$item->db->update("contrat",$saved);
}
}