Jump to content

jriggs

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

jriggs's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks, cant believe I didnt think of that on my own. trying to make it harder than it needed to be!
  2. <?xml version="1.0"?> <Addresses> <Address ID="1"> <Address2>101 MAIN ST</Address2> <City>BIGTOWN</City> <State>OH</State> <Zip5>22222</Zip5> <Zip4></Zip4></Address> <Address ID="2"> <Address2>420 HIGH ST</Address2> <City>MYTOWN</City> <State>AK</State> <Zip5>54321</Zip5> <Zip4>2562</Zip4></Address> </Addresses> My code is reading the above xml, but if there was an error the xml will be different, for example: <?xml version="1.0"?> <Addresses> <Address ID="1"> <Error> <Number>-2147219401</Number> <Source>blah</Source> <Description>Address Not Found. </Description> <HelpFile></HelpFile> <HelpContext>1000440</HelpContext> </Error> </Address> <Address ID="2"> <Address2>420 HIGH ST</Address2> <City>MYTOWN</City> <State>AK</State> <Zip5>54321</Zip5> <Zip4>2562</Zip4></Address> </Addresses> Currently, I am accessing the elements like this: $xml = new SimpleXMLElement($xml_txt); $first_address = $xml->Address[0]->Address2; $second_address = $xml->Address[1]->Address2; This code doesn't work when the error xml is returned. There will always be 2 items in the xml. How can I tell which (if any) address has an 'error' node? Also, I need to know which of the 2 IDs has the error.
  3. Couldnt think of a good place to post this, please move as appropriate I have 2 servers in separate locations - One is an ISP shared server, and the other sits in my house. I'm wondering if there is a way to host an identical file on both boxes and when a user wants to download the file I can pull pieces off of both boxes simultaneously. The idea being that one server has 300Kb/s up and the other has 200Kb/s up so that the file could be dl'd at around 500Kb/s +- because of overhead. I might even be able to find a couple other mirrors to further enhance speeds. Both servers are *nix boxes, admin on 1 root on the other. Anyone have an idea about how to go about this, google is not yielding much help...perhaps I just need the right terminology. Thanks-
  4. Thanks, redarrow, your code got me going down the right path. Wish they had mod+ for your posts, but I will mark it as solved for any others who come along.
  5. Do you mean the code on the server? I don't have that...it's not mine. I need to have php send some xml to a webservice running on that box, but first I need to authenticate on it automatically with the same script.
  6. thanks bro, I've already figured out how to use google. I don't want to use javascript, I want to use PHP. Is there a class or function that allows to connect the default http authentication request?
  7. Just like the subject says, I need to pass login credentials a site via code. Here is the where I'm trying to connect to: https://mit.securecheckout.billmelater.com/paycapture-ws/request In .net I would use the code: cc.Credentials = New System.Net.NetworkCredential("user", "pass") and login Dim resp As New PayCaptureResponse resp = cc.requestServiceRequest(pc) How is this done in php? thanks-
  8. php beginner here. I'm working on a registration form that will post some values to a php page, which in turn redirects to a thank you page. I plan on using javascript to do some basic data validation, but I also will need to connect to a database to re-validate the data. Suppose the form passes the javascript validation, but fails the db stuff on the php page: - How would I redirect back to the html page, but automatically populate whatever fields the user has already filled in? Is there a preferred method to accomplish this? Thanks for any suggestions-
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.