notizBlog

  • About
  • Follow me
  • Kontakt
  • Appearances
  • Standard

    X2V with PHP 5

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    12. August 2007
    Open Web

    Here are some code snippets to use the gorgeous X2V microformats XSLT files from Brian Suda with PHP 5 and libxslt (PHP 5 includes the XSL extension by default).

    hCard to vCard:

    To parse a XML or XHTML document, it has to be valid. To tidy the XML file, you can use a service from the W3C:

    $xml_string_tidy = file_get_contents("http://cgi.w3.org/cgi-bin/tidy?docAddr=".urlencode($uri));Code-Sprache: PHP (php)

    Then you have to create the HTML DOM…

    @$document = new DOMDocument();
    @$document->loadHTML($xml_string_tidy);Code-Sprache: PHP (php)

    and the XSLT DOM…

    $stylesheet = new DOMDocument();
    $stylesheet->load('hcard2vcard.xsl');Code-Sprache: PHP (php)

    Create a new XSLT Processor, load the Stylesheet…

    $processor = new XsltProcessor();
    $processor->importStylesheet($stylesheet);Code-Sprache: PHP (php)

    and run the transformation.

    $result = $processor->transformToDoc($document);
    $str = $result->saveXML();Code-Sprache: PHP (php)

    Now $str contains the transformed code.
    To send the vCard header with PHP, try

    header("Content-Disposition: attachment; filename=contact.vcf");
    header("Content-Type: text/x-vcard; charset=UTF-8 name=contact.vcf");
    echo $str;Code-Sprache: PHP (php)

    If you want to use the vCard extension .vcf instead of .php you have to add something like that to your .htaccess file

    RewriteEngine On
    RewriteBase /
    RewriteRule ^contact.vcf /hcard2vcard.php [L,QSA]

    I hope it works 🙂

    4 Kommentare zu X2V with PHP 5
  • Standard

    Katzencontent

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    9. August 2007
    Journal

    Damit ich auch endlich ein ECHTER Blogger bin und mich keiner mehr auslacht, gibts jetzt auch hier Katzencontent!

    So, ich hoffe Cordobo und Boerge30 erkennen mich jetzt als Blogger an…

    3 Kommentare zu Katzencontent
  • Standard

    Mein Operator Script bei wevent

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    3. August 2007
    nur mal kurz, Open Web

    Mein wevent Operator Script wurde in die wevent Tools aufgenommen 🙂

    1 Kommentar zu Mein Operator Script bei wevent
  • Standard

    Googles Microformats

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    1. August 2007
    Open Web

    Google macht einen Microformats Rundumschlag, so hat es zumindest den Anschein 🙂

    Seit gestern steht ein kleiner Bericht über die Nutzung von hCard in Google Maps auf dem offiziellen Google Maps API Blog.

    hCard in Google Maps

    Außerdem wurden die Mikroformate hAtom und hCard in alle Blogger Standard-Templates eingebaut.

    hAtom und hCard bei Blogger

    Mal gespannt wann Amazon hReview einsetzt…

    3 Kommentare zu Googles Microformats
  • Standard

    Get some nuts! Foo!

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    30. Juli 2007
    Kult & Nostalgie
    Get some nuts

    „Get some nuts“ war eine englische Snickers Werbekampagne mit Mr. T.

    Beschreibung: Mr. T und ein Panzer was muss ich noch mehr sagen!?! 🙂

    (mehr …)
    2 Kommentare zu Get some nuts! Foo!
  • Standard

    Pownce Einladung

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    26. Juli 2007
    nur mal kurz

    So, habe noch 6 10 Pownce Einladungen zu vergeben…

    20 Kommentare zu Pownce Einladung
  • Standard

    Hörspiel-Adventure

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    25. Juli 2007
    Kult & Nostalgie
    Hörspiel Adventure

    Ach wie schön sind doch die guten alten Zeiten… Die „drei Fragezeichen“ hießen noch nicht „Die DR3I“ und auf dem i386 lief Monkey Island 1 oder Maniac Mansion 🙂

    Damals war die Welt noch in Ordnung…

    (mehr …)
    1 Kommentar zu Hörspiel-Adventure
  • Standard

    Wie der Phoenix aus der Asche…

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    24. Juli 2007
    Journal
    MacBook

    So, mein MacBook läuft wieder, und Windows ist auch endlich drauf… Jetzt kanns weiter gehen…

    1 Kommentar zu Wie der Phoenix aus der Asche…
  • Standard

    VW Van vs. A-Team Van

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    21. Juli 2007
    Kult & Nostalgie
    A-Team Van

    Hätte B.A. den A-Team Bus gefahren, wäre das ganz anders ausgegangen…

    I pity da foo!

    (mehr …)
    Keine Kommentare zu VW Van vs. A-Team Van
  • Standard

    Murphy’s law

    Benutzerbild von Matthias Pfefferle

    by

    Matthias Pfefferle

    21. Juli 2007
    Journal

    …und „never change a running system“ werde ich mir ab jetzt GANZ GROSS an jeden PC und Mac kleben, den ich jemals besitzen werde!

    Bis jetzt hab ich ja immer nur schmunzeln müssen wenn mir mal wieder jemand erzählt hat, dass er gerade an seiner Diplomarbeit / Dissertation / Bachelor-Thesis schreibt, uns sein PC mit all den Daten abgeraucht ist, oder wenn mal wieder jemand sein System zerschossen hat, weil er „nur mal kurz“ was ausprobieren wollte.

    Einem selbst würde das natürlich nie passieren… und dabei kam morgens auch noch eine Spam-Mail zum Thema „Online Archivierung von Daten“… braucht man natürlich auch nie!

    Ich gestehe: Ich habe versucht „nur mal schnell“ WINDOWS auf meinem MacBook zu installieren und beim rumhantieren mit den ganzen Festplatten-Tools und BootCamp ist jetzt meine Festplatte KAPUTT! Ja, Kaputt! Es geht gar nichts mehr! Sie wird nicht mal mehr von der Installations-CD erkannt!

    Ich hätte nie gedacht dass Windows SO mächtig ist!

    Zum Glück habe ich meine Daten vorher noch auf nen USB-Stick gezogen…

    4 Kommentare zu Murphy’s law
←Vorherige Seite
1 … 56 57 58 59 60 … 77
Nächste Seite→

notizBlog

  • /now
  • /slashes
  • Appearances
  • Datenschutzerklärung
  • Donate
  • Follow me
  • Followers
  • Impressum
  • notiz.Blog
  • Thanks! ❤️🙌
  • About
  • Projekte
  • Artikel
  • Kontakt

This site is powered by WordPress and styled with the Autonomie theme