Kitz Forum

Announcements => Site & Forum Discussion => Topic started by: kitz on August 07, 2012, 05:43:38 PM

Title: adsl checker - distance calls from map api
Post by: kitz on August 07, 2012, 05:43:38 PM
I am aware that the adslchecker (http://www.kitz.co.uk/adsl/adslchecker.php) is currently not returning all details correctly - ie the distance.

Ive spent a while looking into this because I havent changed anything, however I have just discovered that wef April this year gmaps have introduced a limit on how many distance elements that you can call per day for the free version (link (https://developers.google.com/maps/licensing)).   
Looking at this weeks usage theres several IPs that seem to have gone bananas and when I compare the page calls then its likely this could well be the reason why its not working atm.

Im still investigating this matter.
Title: Re: adsl checker - distance calls from map api
Post by: burakkucat on August 07, 2012, 06:50:30 PM
Thank you for the nod, Kitz.
Title: Re: adsl checker - distance calls from map api
Post by: kitz on August 07, 2012, 07:23:34 PM
Spent the past few hours trying to code something to find out whats going on... it looks like I have a couple of ISP call centres constantly using it.

For eg this is just a short intercept of  just 1 of the several IPs that are using it a lot... despite it currently being broken, and its not office hours, it looks like Im getting several hundred page calls on the adslchecker from them per day.
Code: [Select]
07-08-12 - 17:54:55
07-08-12 - 17:52:20
07-08-12 - 17:51:35
07-08-12 - 17:45:34
07-08-12 - 17:45:23
07-08-12 - 17:45:21
07-08-12 - 17:38:22
07-08-12 - 17:38:02
07-08-12 - 17:37:19
07-08-12 - 17:37:11
07-08-12 - 17:32:39
07-08-12 - 17:29:19
07-08-12 - 17:27:51
07-08-12 - 17:26:18
07-08-12 - 17:26:07
07-08-12 - 17:24:19
07-08-12 - 17:22:29
07-08-12 - 17:20:52
07-08-12 - 17:20:47
07-08-12 - 17:19:59
07-08-12 - 17:19:47
07-08-12 - 17:15:15
07-08-12 - 17:13:25
07-08-12 - 17:08:08
07-08-12 - 17:05:40
07-08-12 - 17:05:25
07-08-12 - 17:04:48
07-08-12 - 17:00:44
07-08-12 - 16:57:51
07-08-12 - 16:57:09

lol my head now aches as Ive been looking at code all afternoon for something that I coded years ago and took weeks/months to develop...  and Ive forgotten half of what I did now  ???

Oh well going to take a break from it  as Ive only just realised how long Ive spent trying to track down the reason why its not working...   and my stomach has just reminded me that Ive not eaten yet today  :(
Title: Re: adsl checker - distance calls from map api
Post by: asbokid on August 07, 2012, 10:28:55 PM
Oh well going to take a break from it  as Ive only just realised how long Ive spent trying to track down the reason why its not working...   and my stomach has just reminded me that Ive not eaten yet today  :(

Aww... Lemme take you out for dinner, Kitz. I'll get another fork and you can share my chips :)

cheers, a
Title: Re: adsl checker - distance calls from map api
Post by: kitz on August 07, 2012, 10:34:16 PM
Gee thanks asbo - pass me the tomato sauce please :)
Title: Re: adsl checker - distance calls from map api
Post by: kitz on August 17, 2012, 12:08:55 AM
I havent forgotten about this..    Ive spent a straight solid 8 hrs on this today and still not got to the bottom of it.

Ive been trying to troubleshoot and re-assemble some new code.. 
.....but since it took me about 6 months practically working night and day to develop it in the first place its not looking like theres a quick and easy fix.
Title: Re: adsl checker - distance calls from map api
Post by: asbokid on August 17, 2012, 01:00:33 AM
Can I help, if only with another bag of chips?!  What about a pickled egg?

cheers, a
Title: Re: adsl checker - distance calls from map api
Post by: kitz on August 17, 2012, 11:30:18 AM
cheers asbo - chips peas and gravy ty :)

Ive now abandoned trying to fix this with gmaps v2 as I understand this is now to be deprecated, it should still work but only up until next year.   So Ive signed up for a new API key on gmaps v3 which should allow me more elements than what I had with my old APIv2 key .   
Google maps doesnt have the best documentation for their API and because its relatively new theres not too much info about it on the web.   

Believe it or not I wasted the best part of an hour yesterday with this from their example code (https://developers.google.com/maps/documentation/javascript/tutorial)

Sample code from their tutorial
Code: [Select]
src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=SET_TO_TRUE_OR_FALSE">
So what had I done wrong, why it wouldnt work?  I put
src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=FALSE"

Why didnt it work..  because its case sensitive and should be
src="http://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&sensor=false">

Does it say that in the API.. nope...  yet they give the example in capitals!  How god-damn stupid  :-X
Im only putting this out there in the hope that it gets indexed so that others dont waste as much time as I did with a rather vague error message. I literally banged my head on the desk when I found out what it was! Judging by the amount of problems out there with this one simple error, but nothing immediately showing the case sensitive solution.

Next problem, converting all the rest of the stuff to the new API format,  and finding a way to pass some javascript results to php variables
(passing client side to server side cant be done straight off)


Title: Re: adsl checker - distance calls from map api
Post by: asbokid on August 17, 2012, 12:02:58 PM
Thumbs up to Kitz for sorting it!  8) Big frown at Google for causing it  :no:

cheers, a
Title: Re: adsl checker - distance calls from map api
Post by: kitz on August 17, 2012, 12:14:27 PM
btw - just in case its not clear

- the current live version on the site uses gmap2
- I cant find a quick fix to the distance problem and am having to start again.  I dont see the point continuing with gmap2 if its going to be deprecated next year.
- v3 is under development and could take a while :(

Title: Re: adsl checker - distance calls from map api
Post by: snadge on September 26, 2012, 03:46:46 AM
are you going to include a daily/hourly limit per IP to stop these pesky free-loading ISPs from using it hundreds of times per day? the bloody money they earn why havent they got their own? maybe you should contact them and cut a deal lol..
Title: Re: adsl checker - distance calls from map api
Post by: kitz on October 07, 2012, 12:06:16 AM
v2.5 now live  :D

Using v3 for distance, but still working on updating maps to v3 api.   At least it should be working again.
Title: Re: adsl checker - distance calls from map api
Post by: kitz on April 16, 2013, 02:39:13 PM
Currently working on a full update to gmap v3.

Finally have working code for the maps, but there may be some disruption to the live adslchecker today whilst I update and change code to live.
Title: Re: adsl checker - distance calls from map api
Post by: UncleUB on April 16, 2013, 05:14:11 PM
Just tried using it and didn't work(for me)

Quote
Error connecting to database. Please try again.
Possible causes are incorrect phone no or postcode or the system is busy   
Title: Re: adsl checker - distance calls from map api
Post by: kitz on April 16, 2013, 06:18:49 PM
Update now completed.



>> 05:14:11 PM Error connecting to database.

I was still working on it at that time.  Although (after months of hair tearing) I had working code tested and working for the API... I still had to integrate it into the main code of the adsl checker.  Because it uses session data then I knew there would likely be a few hiccups whilst I implemented the live code.

Should hopefully be fine now  :fingers:

Title: Re: adsl checker - distance calls from map api
Post by: UncleUB on April 16, 2013, 06:57:12 PM
Its working  :thumbs:

It now shows Digital Region....Under LLU ?.......Why isn't it showing under FTTC as that is what DR supplies.I get 24mb down and 10mb FTTC yet no mention of a fibre connection being available. :-\
Title: Re: adsl checker - distance calls from map api
Post by: kitz on April 16, 2013, 07:39:31 PM
Ive not changed any of the ISP code...  Ive purely been updating the google maps API ie distance between home and the exchange.. and the map output.

>> Why isn't it showing under FTTC as that is what DR supplies.

I dont have any information about Digital Region and theres nothing in Sams API to call on them directly.
afaik, theres nothing anywhere released outside of BT's own database or DRs database which will give you an estimate of speeds for FTTC.

What I did do though Last october (http://forum.kitz.co.uk/index.php/topic,11755.msg225119.html#msg225119) is hack something together which will pick up if your exchange is in an area served by DR and list them under alternative suppliers.  iirc sam also hit the same problem and also lists them under LLU.

If there was a publicly available list of cabs and predicted speeds I'd love to be able to get my mits on it and add this info to my database, so it could also be output, but unfortunately atm my hands are tied :(

Title: Re: adsl checker - distance calls from map api
Post by: UncleUB on April 16, 2013, 10:27:45 PM
Ive not changed any of the ISP code...  Ive purely been updating the google maps API ie distance between home and the exchange.. and the map output.

>> Why isn't it showing under FTTC as that is what DR supplies.

I dont have any information about Digital Region and theres nothing in Sams API to call on them directly.
afaik, theres nothing anywhere released outside of BT's own database or DRs database which will give you an estimate of speeds for FTTC.

What I did do though Last october (http://forum.kitz.co.uk/index.php/topic,11755.msg225119.html#msg225119) is hack something together which will pick up if your exchange is in an area served by DR and list them under alternative suppliers.  iirc sam also hit the same problem and also lists them under LLU.

If there was a publicly available list of cabs and predicted speeds I'd love to be able to get my mits on it and add this info to my database, so it could also be output, but unfortunately atm my hands are tied :(

Its not a problem,I was just curious thats all.. :)

If it wasn't for DR I would still be tied down to around 2/2.5mb LLU as BT has no plans to upgrade my exchange(Attercliffe),and no Virgin cable available.