I wondered if anyone could tell me if it is possible to read a number from a website and then save it in my app as a setting. Then when a update button is click it goes back to the website and gets then updated number. This would probably be the site http://www.x-rates.com/ I would want to take one of the numbers in the currency table. Can this be done? If so, Can someone show me how?
Its simple yo... use an Internet Transfer Control to get the source then use string.split to split into ways such that u can extract out the number such as the class="bactive" delimeters...
I have no idea what that means I am quite a noob. Could you do an example where it takes one of the numbers in that table and puts them in a textbox, it would be a great help.
Hey here you go... this is a very basic example. You can basically take anything you want from a website using its source. But remember it would HAVE to be different for different websites. Let me know if this helps!
This takes it from the other table, but these numbers are not the same length as each other. So some take some of the other code and some are not complete.
What I would like to is take the number between to bits of code, so this would also mean that I would be able to choose which of the numbers I want. Its ok me saying this but I do not know how to do it.
I suppose this code would be something like this not sure at all though:
VB Code:
seps(0) = "part of code" this is the number "part of code"
Ok I have tried to do this but I have no idea what I am doing and how to get it working. Could you try to get it working with you first example and post it again?
The problems I am having is the html has "" in it which tricky, because I want to go all the way back to where it says what the number is for e.g
Code:
"/d/USD/GBP/graph120.html" class="menu">
This means I am able to take the numbers I actually want.
Another problem is that this part:
Hey I am not sure what u are saying on your last post but if the code part had quotes then u can do this:
say the code was: class="bactive" title
you can do "class=" & chr(34) & "bactive" & chr(34) & " title"
And i'll post the code for getting the other number on tuesday. What my code currently does is that it saves the source code in strSource. Then seps is the array of string which act as the seperator. Eg: blah ="1 2,3-4" would be seperated into any array str(0) = 1 str(1) = 2... if the sep(0) = " " and seps(1) = "," and seps(2) = "-"... when blah.split(seps) is called... So once you hit GO, you just need to figure out how u can seperate what u want from the rest of the code.
Just clarify a little more and i'll update the program soon...
Hey tell me eactly which rates do u want to extract from the xrates website... are u talking about the table on the bottom or the top? i did the top one... im gonna do the bottom on and will post it today... hopefully in like 30 mins...
ok done... i used a little trick to seperate the numbers here... look at my seps they are before and after... and then only picks ones that are small... let me know if u get it? cuz understanding the concept is more important here than the program if you also wanna use the idea with other websites...
Alright cool yo... glad I could help... I am still new to all this too... trying to learn mySQL/ASP.NET (confusing ar h3ll right now).... btw if u need my help u can contact me thru messenger usually online...
Right been trying to put this into my existing app but having some problems, I want to do this behind the scenes to where the textbox where the source is kept is invisible also the output. But I can not get the webpage to open, it was saying like not found or something, and the source was just [html] [\html]. It think it to do with the, my app do events, I do not know what this does. Can you help?
Also I am going to be learning some stuff with mySQL soon, if you make any projects that you think could be useful could you post them I will do the same.