473,325 Members | 2,872 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Need to capture data returned to another Website

I'm working with a company that is tracking my vihicle and they have an API that will allow me to log into their database and retrieve the location of my vihicle, which is returned to their website as an XML response.

My question is: Is there way to get the data that is returned in the response so I can use that data on my website. I tried talking to them but they don't have any tech people there. Plus I would rather the response didn't show up on their website.

Here is the code that they have on their website as an example:
[HTML]<form method='post'
action='https://www.sysdevx.com/api/GetAllVehicles.php'>
<input type='text' name='login' value='your_login' />
<input type='text' name='password' value='your_password' />
<input type='submit'>
</form>[/HTML]

And the response is:

Expand|Select|Wrap|Line Numbers
  1. <response>
  2. <status code="100" msg="Success"/>
  3. <vehicle serial="2002348" date="1170813924" lat="49.2520500" 
  4.   lng="-123.1108800" type="18" address="271 W 21st Ave, Vancouver, BC, V5Y" 
  5.   speed="0" heading="0"/>
  6. <vehicle serial="2001452" date="1157654983" lat="49.2521320" 
  7.   lng="-123.1111760" type="17" address="" speed="0" heading="0"/>
  8. <vehicle serial="2001450" date="1168890892" lat="32.7947333" 
  9.   lng="-117.1367500" type="0" address="8999 Gowdy Ave, San Diego, CA, 92123" 
  10.   speed="0" heading="-1"/>
  11. </response>
Jul 31 '07 #1
6 2809
drhowarddrfine
7,435 Expert 4TB
Yes, but you would need javascript to do that.
Jul 31 '07 #2
Since you didn't post how to do it with JavaScipt I take it I need to move this question to that forum?
Jul 31 '07 #3
I'm working with a company that is tracking my vihicle and they have an API that will allow me to log into their database and retrieve the location of my vihicle, which is returned to their website as an XML response.

My question is: Is there way to get the data that is returned in the response so I can use that data on my website. I tried talking to them but they don't have any tech people there. Plus I would rather the response didn't show up on their website.

Here is the code that they have on their website as an example:
Expand|Select|Wrap|Line Numbers
  1. <form method='post' 
  2. action='https://www.sysdevx.com/api/GetAllVehicles.php'>
  3. <input type='text' name='login' value='your_login' />
  4. <input type='text' name='password' value='your_password' />
  5. <input type='submit'>
  6. </form>
  7.  
  8. And the response is:
  9. <response>
  10. <status code="100" msg="Success"/>
  11. <vehicle serial="2002348" date="1170813924" lat="49.2520500" 
  12. lng="-123.1108800" type="18" address="271 W 21st Ave, Vancouver, BC, V5Y" 
  13. speed="0" heading="0"/>
  14. <vehicle serial="2001452" date="1157654983" lat="49.2521320" 
  15. lng="-123.1111760" type="17" address="" speed="0" heading="0"/>
  16. <vehicle serial="2001450" date="1168890892" lat="32.7947333" 
  17. lng="-117.1367500" type="0" address="8999 Gowdy Ave, San Diego, CA, 92123" 
  18. speed="0" heading="-1"/>
  19. </response>
Jul 31 '07 #4
drhowarddrfine
7,435 Expert 4TB
This is the html/css forum so, yes, I'll move it.
Jul 31 '07 #5
pbmods
5,821 Expert 4TB
Merged duplicate threads.
Jul 31 '07 #6
gits
5,390 Expert Mod 4TB
...
And the response is:

Expand|Select|Wrap|Line Numbers
  1. <response>
  2. <status code="100" msg="Success"/>
  3. <vehicle serial="2002348" date="1170813924" lat="49.2520500" 
  4.   lng="-123.1108800" type="18" address="271 W 21st Ave, Vancouver, BC, V5Y" 
  5.   speed="0" heading="0"/>
  6. <vehicle serial="2001452" date="1157654983" lat="49.2521320" 
  7.   lng="-123.1111760" type="17" address="" speed="0" heading="0"/>
  8. <vehicle serial="2001450" date="1168890892" lat="32.7947333" 
  9.   lng="-117.1367500" type="0" address="8999 Gowdy Ave, San Diego, CA, 92123" 
  10.   speed="0" heading="-1"/>
  11. </response>
hi ...

you may parse through the response with javascript's dom-methods, for example:

Expand|Select|Wrap|Line Numbers
  1. // get a reference to the response-node
  2. var response = document.getElementsByTagName('response')[0];
  3.  
  4. // get the values you want from the first child-node
  5. var vehicle1_serial = response.childNodes[0].getAttribute('serial');
so you see that you may loop through the childNodes-list and get the interesting things out of the nodes with getAttribute ;)

kind regards
Aug 1 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: lawrence | last post by:
I've been bad about documentation so far but I'm going to try to be better. I've mostly worked alone so I'm the only one, so far, who's suffered from my bad habits. But I'd like other programmers...
2
by: MK | last post by:
Hello, I am new to XML and PERL and I have a few questions the answers to which I need to complete a project. All your time and effort would be highly appreciated. I have to make a small HTML page...
0
by: MK | last post by:
Hello, I am new to XML and PERL and I have a few questions the answers to which I need to complete a project. All your time and effort would be highly appreciated. I have to make a small HTML page...
1
by: sangith | last post by:
Hi, I tried the packet capture module program. I did a file transfer using ftp from this host to another server. But when I ran the program, it was just hanging off and it did not print the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.