Sunday, June 24, 2012

PHP Script to read curl data from other site

<?php
    $curl = curl_init();
    /*curl_setopt ($curl, CURLOPT_URL, "http://api.careerbuilder.com/v1/jobsearch?&DeveloperKey=WDH38FQ65G6P0DTBZ09C&Keywords=php&PageNumber=1");*/
    curl_setopt ($curl, CURLOPT_URL, "http://api.careerbuilder.com/v1/jobsearch?&DeveloperKey=111&Keywords=php&PageNumber=1");
    curl_setopt ($curl,CURLOPT_RETURNTRANSFER,1);
    $data = curl_exec ($curl);
   
        $arrData = simplexml_load_string($data);
        echo "<pre>";
        print_r($arrData);
    curl_close ($curl);
?>

No comments:

Post a Comment

Please mention your comments.......