Web Analytics Made Easy -
StatCounter PHP - XML tutorial - CodingForum


No announcement yet.

PHP - XML tutorial

  • Filter
  • Time
  • Show
Clear All
new posts

  • PHP - XML tutorial

    Does anyone know a good tutorial on PHP and XML?

    I need to build an authentication app using just Flash, PHP and XML (no database at all). I use Flash as the interface, and XML to store username and password (this XML file is located outside root directory, that's why I need PHP to read it.)

    I will send 2 variable "name" and "password" to the PHP page, then PHP will read the XML and check if name and password are matched.

    any ideas or suggestions?

    thank you in advance

    PS: my XML formatted like this:

    <Subscriber Name="one" Password="pass1" Exp="12/1" VIP="1"/>
    <Subscriber Name="two" Password="pass2" Exp="12/15" VIP="0"/>
    Last edited by dominicosavio; Feb 21, 2004, 11:36 PM.

  • #2
    why stored in XML ???

    its really hard to justify cranking up an XML parser of any sort just for this ... & even then
    <etc />

    (or at least <user pass="" expire="" etc="">username</user>)

    would be easier to parse with PHP's current XML functions or DOM etc extensions.

    If you are stuck with your current XML format then I would suggest using regex to parse out the data , in saying that I am not Mordred

    [note that XML functionality coming with PHP5 may make this a lot easier]
    Last edited by firepages; Feb 22, 2004, 08:52 AM.
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)