Reading information from another site?
Thanks for the reply declan.
About the iframe: that's not an option for me as I have to do some calculations with the numbers you saw on the site...
About the server-side language: should i use php then?
if yes: how do i move this topic? what would this php script look like?
Originally Posted by Declan1991
Originally Posted by Kor
preg_split is the better method to use first of all.
What exact calculation are you trying to do? The present one is this, which I somehow doubt is what you want. Though that's not -9 so the values on the page must have changed recently.
Well, you can still use the information from the iFrame, but the PHP solution would be my preferred anyway.
Include tutorial. From what I know of PHP, that will work for an internal file, but you can read all about that at php.net.
Declan - I have asked this question and seen similar posts and they all said it was impossible on client-side. Is the hidden IFRAME wheeze an exception to received wisdom?
I will try it soon anyway.
I was going to hide my IFRAME during the inspection phase to speed the process, but I found that rendering proceeds after onLoad fires anyway. So I guessed it would not improve anything.
Last edited by Kor; 08-16-2010 at 09:09 AM.
This is what i made up:
I however failed to do the calculation - $b=(10^(($raintime-109)/32)); - properly...
$raintimestr = file_get_contents('http://gps.buienradar.nl/getrr.php?lat=52.2167&lon=5.01667');
$raintime = split("[\n| ]+",$raintimestr);
I keeps saying that -9 is the answer and that is not right...
And how could we know which is the correct value? We don't know what is the response. We don't know which are the values of your variables...
Originally Posted by knstr
Kor is correct; access is denied.
I was under the impression that you could access the contents of an iFrame on the page
At least 98% of internet users' DNA is identical to that of chimpanzees
The outcome of the calculation is a rainfall depth, so in mm/h. That's always positive, and -9 isn't .
If $raintime is 0, the outcome should be 3.9E-4 mm/h (so almost nothing...)
$raintime is a value between 000 and 255 i think... But i think the problem is that its still a string, not a number.
I tried to convert the raintime to a number using:
but that didn't work.
I hope you guys can help me. Thanks for the effort so far!
Iframe wont work
But you can get the content of a particular text box/div/button etc you can get it. Still the src of the iframe should be in your application. 3rd parties link wont work.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Tags for this Thread