Can't you just range check the supplied varibles, and quickly return a
403 or similar.
Just checking the numbers for specific ranges should be very quick in
php and take little resources, so can jsut reject them.
$x = intval($_GET['X']);
if ($x = 3 && ($x < 10 || $x > 56)) {
header("HTTP/1.0 403 Forbidden"); die();
}
.. to take it a step further could work out the coordinates of the
position - so that dont need to hard code the zoom levels.
On Sat, Sep 27, 2008 at 7:48 PM, <[EMAIL PROTECTED]> wrote:
> I need some simple logic (simplest possible…) to test for tile requests that
> are "bad", out of range or simply badly formed.
>
> Im using the url template within the api, something like this:
> myURL/tiles/{X}-{Y}-{Z}.png
>
>
>
> The tile server basically tries to retrieve a tile if it already exists in
> the cache, and generates it "on the fly" if its not in the cache.
>
>
>
> Now, Im worried that people might eventually maliciously try to access this
> url directly, passing it junk parameters just to slam the server.
>
> Does anyone have any advice on simple logic to keep this from happening?
>
>
>
> Note: I don't need code, I need an algorithm (though Id be doing this
> testing in php).
>
> >
>
--
Barry
- www.nearby.org.uk - www.geograph.org.uk -
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---