Everybody! This is important. In a few days, these forums will be moving over to using the totally sweet Discourse platform. To ensure this migration happens smoothly with no loss of content, these forums are currently in a read-only mode. I do apologize for the inconvenience.

There is never a good time to turn the forums off for an extended period of time, but I promise the new forums will be a billion times better. I'm pretty sure of it.

See you all on the other side in a few days, and if you have any (non-technical) questions, please e-mail me at kirupa@kirupa.com. For technical questions, try to find a tutorial that corresponds to what you are looking for and post in the comments section of that page.


Results 1 to 2 of 2

Thread: Seeking Assistance

  1. #1

    Seeking Assistance

    I am currently trying to develop a program which will perform an HTTP GET to our inventory hosted on a third party vendor. I am capable of getting into the database and have a response coming back. When I run the program (E.g. inventory.php) and viewthe page source I see the XML. My question is how do I go about saving that XML into a document or a string for use later in parsing out into tables?

    This is my code as of now.


    $path = "/cdmapi/dlapi.asmx/DLAPI?Request=string&DealerID=string&LoginID=strin g&Password=string";
    $port = 80;
    $host = "api.cdmdata.com";

    if (count($argv) > 1) $path = $argv[1];
    if (count($argv) > 2) $port = $argv[2];
    if (count($argv) > 3) $host = $argv[3];
    $address = gethostbyname($host);
    $socket = socket_create(AF_INET, SOCK_STREAM, SOL_TCP);
    socket_connect($socket, $address, $port);
    $in = "GET $path HTTP/1.0\r\n\r\n";
    socket_write($socket, $in, strlen($in));

    while ($out = socket_read($socket, 4096)) {
    echo $out;



    Thank you much in advance. Also if you have an links to any tutorials on this subject it would be greatly appreciated.

    You may contact me directly with any advice. atrevino@cavenderauto.com

  2. #2
    Issue resolved, please see new thread. http://www.kirupa.com/forum/showthre...33#post2489233 Thank you.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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

Home About kirupa.com Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012