Welcome to the Kelkoo Group Customer Service

Code Sample PHP

  • Download code Sample
  • Here some code sample in PHP to help you read our feeds:

    <?php
    
    try{
        $ListOffers = simplexml_load_file('Offerfeed_10926823_fr.full.xml');
        //print_r($ListOffers);
    
        foreach ($ListOffers as $OneOffer)  {
    
            // get each element's value 
            $title = $OneOffer -> Title ;
            $desc = $OneOffer -> Description ;    
    
            $images = $OneOffer -> Images;
            $image  = $images[0] -> Image -> Url;
    
            $offerUrl = $OneOffer -> Url;
    
            //only for display information    
            print $title;
    
    
        }
    }catch(Exception $e){
        print_r($e);
    }
    
    
    ?>