SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Non-Member
    Join Date
    Mar 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post XML Data to PHP (WhoIs Query Results)

    Hi,

    Im have XML Data that I need to place into PHP variables.

    How do I go about this?

  2. #2
    Chessplayer kleineme's Avatar
    Join Date
    Apr 2004
    Location
    Germany
    Posts
    608
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Never ascribe to malice,
    that which can be explained by incompetence.
    Your code should not look unmaintainable, just be that way.

  3. #3
    Non-Member
    Join Date
    Mar 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Cheers.

    *Looking Now*

  4. #4
    Non-Member
    Join Date
    Mar 2005
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Exclamation

    Hmm.. not sure if thats what i was really after..

    Here is what I want to do:

    Code:
      <?xml version="1.0" encoding="utf-8" ?> 
    - <whoisapi>
    - <application>
      <appname>search_engine</appname> 
      <version>2</version> 
      <partner>groopi</partner> 
      <key>1234-1234-1234-1234-1234</key> 
      <customer_ip>123.123.123.123</customer_ip> 
      <engine>maude</engine> 
      <spork>apu</spork> 
      </application>
    - <request>
      <q>somedomain</q> 
      <rows>20</rows> 
      <bn>n</bn> 
      <bh>A</bh> 
      <bc>n</bc> 
      <f7>n</f7> 
      <left>n</left> 
      <right>n</right> 
      <ordered>n</ordered> 
      <pool>C</pool> 
      <page>1</page> 
      <exactfirst>y</exactfirst> 
      </request>
    - <response>
      <errlev>nowarnings</errlev> 
      <options>4</options> 
      <time>20050419020726-63</time> 
      <extn>COM|NET|ORG|INFO|BIZ|US</extn> 
      <did_you_mean>some domain</did_you_mean> 
      <page_current>1</page_current> 
      <page_min>1</page_min> 
      <page_max>1</page_max> 
      <page_extreme>1</page_extreme> 
      <records_returned>2</records_returned> 
      <record_min>1</record_min> 
      <record_max>2</record_max> 
      <record_extreme>2</record_extreme> 
      <querytime>0.011707</querytime> 
    - <d>
      <id>1</id> 
      <n>somedomain</n> 
      <s>wqqdqq</s> 
      </d>
    - <d>
      <id>2</id> 
      <n>somedomain</n> 
      <s>wqqdqq</s> 
      </d>
      </response>
      </whoisapi>
    The Above XML btw is output from the 'Name Intelligence' Whois API.

    What i want is to some how have the values in that converted into PHP variables.. similiar to this:

    PHP Code:
    $domainquery 'XML Output for </request></q>somedomain</q></request>'
    Is it possible? if so.. how?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •