The forums have permanently moved to This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.

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 = "";

    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.

  2. #2
    Issue resolved, please see new thread. 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 Meet the Moderators Advertise

 Link to Us


Copyright 1999 - 2012