To display your feedburner RSS count as text we need to just add two snippets of code to our website. Open up a blank notepad document copy and paste the code below.
//get feedburner count $whaturl="https://feedburner.google.com/api/awareness/1.0/GetFeedData?uri=hvdesigns"; //Initialize the Curl session $ch = curl_init(); //Set curl to return the data instead of printing it to the browser. curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); //Set the URL curl_setopt($ch, CURLOPT_URL, $whaturl); //Execute the fetch $data = curl_exec($ch); //Close the connection curl_close($ch); $xml = new SimpleXMLElement($data); $fb = $xml->feed->entry['circulation']; //end get feedburner count |
No comments:
Post a Comment