On the site www.weddingserviceproviders.co.uk I have a search by post code radius, but it has a drop down list of categories so that you can search particular categories by post code. The firs option in the drop down box is all services, which is a blank option which should and did used to search within all categories.
If this is used I now get an error message...
Example: All categories Within 10 miles of RH11 6AP
The local UK database only has the leading half of the postal codes, and chops off the second half. So without the space to chop at, it can't find it in the local database, so it's querying a web service backup, which is timing out for whatever reason.
Is there a consistent way to know where to split the code without having a space to work with?
Comments on Post code search
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
On the site www.weddingserviceproviders.co.uk I have a search by post code radius, but it has a drop down list of categories so that you can search particular categories by post code. The firs option in the drop down box is all services, which is a blank option which should and did used to search within all categories.
If this is used I now get an error message...
Example:
All categories
Within 10 miles
of RH11 6AP
An error occoured at www.weddingserviceproviders...r&filled=1&whichtype=links on 2009-05-24 07:52:41. Please relay this data to support. Error #2: 'file_get_contents(ws.geonames.org/findNearbyP...ostalCodes?postalcode=RH13 6ap&radius=16&maxRows=500&country=AL) [function.file-get-contents]: failed to open stream: Connection timed out' in /home/hello211/public_html/includes/filefunctions.php on line 513.
Step 1 of backtrace:
File: /home/hello211/public_html/includes/filefunctions.php
Line: 513
Function: file_get_contents
Arguments: ws.geonames.org/findNearbyP...ostalCodes?postalcode=RH13 6ap&radius=16&maxRows=500&country=AL Resource id #41
Step 2 of backtrace:
File: /home/hello211/public_html/includes/commonfuncs.php
Line: 200
Function: geturl
Arguments: ws.geonames.org/findNearbyP...ostalCodes?postalcode=RH13 6ap&radius=16&maxRows=500&country=AL
Step 3 of backtrace:
File: /home/hello211/public_html/includes/searchlogic.php
Line: 12
Function: getlocalzips
Arguments: RH13 6ap 10
Step 4 of backtrace:
File: /home/hello211/public_html/search.php
Line: 22
Function: include
Arguments: /home/hello211/public_html/includes/searchlogic.php
---
Also, if someone puts in a post code incorrectly (omits the space) the results are wrong. Is there any way to make it so it works...
For example...
If someone puts in RH136AP instead of RH13 6AP, the results are incorrect.
Thanks
Jon
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
The local UK database only has the leading half of the postal codes, and chops off the second half. So without the space to chop at, it can't find it in the local database, so it's querying a web service backup, which is timing out for whatever reason.
Is there a consistent way to know where to split the code without having a space to work with?
Forum Regular
Usergroup: Customer
Joined: Nov 27, 2006
Total Topics: 187
Total Comments: 465
I thought that would be the case. No there is not a consistant way to know where to chop it.
RH13 6AP is a post code
RH7 6PP is a post code
developer
Usergroup: Administrator
Joined: Dec 20, 2001
Location: Diamond Springs, California
Total Topics: 61
Total Comments: 7868
I have have an autocomplete that'll hint to people to only type the first part in 5.1, but there's nothing I can do for 5.0.