Home » Archives » November 2007

Displaying RSS feeds using PHP (Parsing XML)

November 14, 2007

Hello everybody I've already use this XML parse script using PHP and it really works, now if your tired of searching exact script of parsing XML to PHP now you have this one. Below are the codes I edited I found this in the tutorial and I edited some codes to make this work perfect.

 

<?php

$file = "put your XML data here.xml";
$insideitem = false;
$tag = "";
$title = "";
$description = "";
$link = "";

function start($parser, $name, $attrs){
 global $insideitem, $tag, $title, $description, $link;
  
 if ($insideitem) {
  $tag = $name;
 } elseif ($name == "ITEM") {
  $insideitem = true;
 }
}

function ends($parser, $name){
 global $insideitem, $title, $description, $link;
 
 if ($name == "ITEM") {
  printf("<dt><b><a href='%s'>%s</a></b></dt>", trim($link), trim($title));
  printf("<dd>%s</dd><br><br>",trim($description));
  $title = "";
  $description = "";
  $link = "";
  $insideitem = false;
 }
 
}

function character($parser, $data){
 global $insideitem, $tag, $title, $description, $link;
 if ($insideitem) {
 switch ($tag) {
  case "TITLE":
  $title .= $data;
  break;
  case "DESCRIPTION":
  $description .= $data;
  break;
  case "LINK":
  $link .= $data;
  break;
 }
 }
}

?>

<html>
 <head>
 <title></title>
 </head>
 <body>
 <style>
  a{
    font-size: 14px;
  }
 </style>
  <div style="padding:8px; font-family:Arial, Helvetica, sans-serif; font-size:12px;">
   <?
        $xml_parser = xml_parser_create();

  xml_set_element_handler($xml_parser, "start", "ends");
  
  xml_set_character_data_handler($xml_parser, "character");
  
  $fp = fopen($file, "r") or die ("Error:");
  
  while ($data = fread($fp, 4096))
   xml_parse($xml_parser, $data, feof($fp)) or die(sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)),
   xml_get_current_line_number($xml_parser)));
  
     
  fclose($fp);
  xml_parser_free($xml_parser);
   ?>
  </div>
 </body>
</html>

 

I hope this article helps.

Feel free to send me comments or suggestions.

Thanks.

Posted by mabuc at 11:32 am | permalink | comments[1]

CSS Developers, Designers and Freelancers, This is for you.

November 13, 2007

We all know that the standard format of making a website is CSS if you want more informations about CSS and freelance questions or template design here it is, the following links.

http://www.cssmania.com

http://www.csspinoy.com

http://www.psdtuts.com

http://www.faveup.com

http://www.freelanceswitch.com

and also we have to follow the W3C standards.

Posted by mabuc at 12:19 pm | permalink | comments[2]

RP mall blast tagged an accident

Beting Laygo Dolor, Nov 07, 2007
MANILA — The deadly blast at an upscale shopping mall in the business district of Makati City which claimed 11 lives and injured more than 100 last month was an accident, not a terrorist attack.

This was the conclusion of the Philippine National Police (PNP), as well as explosives and demolitions experts from the U.S., Australia and Israel who helped the Philippine government investigate the Oct. 19 explosion at the Glorietta II mall.

“We are happy… that this cannot be attributed to terrorism because that would be a major development. It will affect our economy, our standing in the world community, our international investors,” Executive Secretary Eduardo Ermita said over the weekend.

“We are not happy about the explosion,” he said, “because people’s lives were lost, many were injured, but we just have to go by the result of the investigation.”

That investigation concluded that the explosion was an accident probably caused by a mixture of gases from a malfunctioning septic tank and a diesel tank in the basement of the mall. Vapor from the diesel tank could have mixed with methane from the septic tank causing the blast. The mall kept a large tanker of diesel for its generators as an alternative power supply.

Supporting the conclusionwas the absence of residue which would have been left over had a bomb or explosive device been used.

“It is good that this was not an act of terrorism,” said Ermita.
But the PNP has not totally ruled out the possibility that the explosion may have been triggered by a bomb. The PNP’s Bomb Data Center has not yet submitted its findings as its team returned to the site of the blast over the weekend to continue looking for bomb fragments and other residue.

Real estate giant Ayala Land, Inc. which owns and operates the mall did not agree with the conclusion arrived at by the PNP, which said “negligence” was the probable reason for the tragedy.

Ayala Land president Jaime Ayala said local and foreign experts hired by the company had debunked the PNP conclusion that the explosion was caused by negligence.

He said the company ruled out gas explosion as cause of the lunch hour incident. Damage to the mall has been estimated at P100 million and large parts of Glorietta II remain closed.

“We don’t think negligence is relevant with respect to this incident,” he said during a press conference Sunday. “It is highly unlikely that methane would be produced in the Glorietta II basement sump pits because the conditions for the production of methane in substantial quantities was not present,” Ayala added.

The Australian investigation team concluded that there was “no evidence to suggest that the explosion had been caused or initiated by an improvised explosive device,” according to PNP National Capital Region chief Geary Barias. The Israeli investigators also had the same conclusion.

They are waiting for the post-blast report from the U.S. Federal Bureau of Investigation to collate with all other findings before submitting a final report, Barias said.

But Ayala insisted the damage, which led to the partial closure of the mall, was too substantial to have been caused by gas build-up “We could not conclusively say whether or not there is a bomb crater,” he said, adding that their own experts had noted that the twisting of steel reinforcements was consistent with damage usually caused by a bomb.

Ayala spokesman Alfonso Reyes said their own technical crew had found no likely errors which could have caused the massive blast.

He said they would wait for the official report to be released this week before commenting. “We are hoping that the national police will release its report on the blast as soon as possible so we will be able to evaluate the findings and come up with a response,” Reyes said.

Shares of the listed company took a dive after the primary results of the investigation were released last week.

Glorietta II used to be the old Quad theater arcade adjoining the former Makati Supermart. The explosion occurred at the basement of the area that was being leased by the Luk Yuen restaurant. – With reports from AFP

Posted by mabuc at 12:03 pm | permalink | comments[1]

Rocking with Calliope

November 12, 2007

Thank you for choosing Calliope to make your mark on the world wide web. You’ve made an awesome choice. because Calliope doesn’t just give you a blog, It gives you:

Unmatched privacy and security
Calliope gives you the power to create your own “Me Wide Web”, a slice of the internet that is truly your own, made available to who you choose, be it everyone or a select few.Simply add people you want to give access to via the control panel and set permissions every time you post new blog posts, photos or audio files.

A whole new level of customizability
Calliope allows you to edit all aspects of your blog on the fly, quickly and easily.

The most complete profile page
Our profile page brings together the essential content you have put out on the web, be it your social networks, your online photos and videos even your social bookmarks and anything else you consider significant. Your new profile page doesn’t just say who you are in the Calliope network, it’s a roadmap to who you are on the internet.

A powerful photo gallery
Calliope’s powerful photo gallery allows you to showcase your best photos to the world; the photo gallery also allows for easy organization of your digital memories and comes with advanced privacy and security options so you can control who sees which of your pictures.

Integrated Audio player
Calliope comes integrated with an audio player that allows you to upload your favorite songs and podcasts and organize them with ease. Stream your audio files from Winamp and iTunes; you can even set privileges so that you control who gets to stream or download your audio.

Your very own domain. (example: username.iblog.ph)

Mail forwarding
All email messages sent to yourusername@iblog.ph are automatically forwarded to the email address you used to register, giving you a unique, conveniently short email address.

Calliope was not designed with an aim to outdo all the existing blog platforms out there, but by thinking of ways to enrich YOUR online experience, that’s exactly what we ended up with. If we strip everything down, the internet is all about people. Lots and lots and lots of people. We understand that it’s easy to get lost in the pack. We want you to stand out. This is why Calliope is all about you. Enjoy!

Posted by mabuc at 11:24 am | permalink | comments[2]

Who I am?

Hello!

My Name is Mark Abucayon - Filipino Web Developer, Designer, Flash Developer, and Blogger based in Philippines specializing Web Standards CSS XHTML - I love reading tutorials and twit everday.

If you have any inquiries, you may contact me thru email

     

November 2007
M T W T F S S
    Aug »
 1234
567891011
12131415161718
19202122232425
2627282930  

Sponsored Links

Monthly Archives

    

Subscribe

Technorati
Bloglines

Message on the Board

spiker:

This is great and wonderful work mark keep it up..

eM-eM:

awesome work mark!
keep it up..
Godbless ur work.

aileen:

nice site mark!! 2 thumbs up! ;)

Philam:

This is really nice site keep up this work dude

Spike:

This is nice mark- keep up the good work.

Leave a message ▼