Follow us on Twitter!
It is the path of least resistance that makes rivers and men crooked. - Bj Palmer
Friday, April 25, 2014
Navigation
Home
HellBoundHackers Main:
HellBoundHackers Find:
HellBoundHackers Information:
Learn
Communicate
Submit
Shop
Challenges
HellBoundHackers Exploit:
HellBoundHackers Programming:
HellBoundHackers Think:
HellBoundHackers Track:
HellBoundHackers Patch:
HellBoundHackers Other:
HellBoundHackers Need Help?
Other
Members Online
Total Online: 20
Guests Online: 20
Members Online: 0

Registered Members: 82908
Newest Member: krishna7799
Latest Articles
View Thread

HellBound Hackers | Computer General | Webmasters Lounge

Author

Help with script - Coders needed!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 02-01-09 17:15
I'm helping a friend out with a site that involves setting up rides to and from college - pretty much a carpool service. Anyways he wants to have a script that determines "partial destinations" - so if you were traveling from city A to city B, the script would find the major cities between the cities so you could drop a passenger off.

If anyone could give me any suggestions on the best way to go about this that would be great. I'd be willing to send some small bonuses for helpful information.

Thanks


Author

RE: Help with script - Coders needed!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 02-01-09 17:22
Well, you'd have to assign some kind of X and Y value to each city... then, you could just use BETWEEN in your query to find results lying between the two.


Author

RE: Help with script - Coders needed!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 02-01-09 17:28
so do you think using longitudes and latitudes in the database would work? btw the script only needs to work for the state of Indiana right now. And all trips will be either from Bloominton or to Bloominton.


Author

RE: Help with script - Coders needed!

ynori7
Member



Posts: 1486
Location: #valhalla
Joined: 08.10.07
Rank:
God
Posted on 02-01-09 17:50
You have to decide what exactly qualifies as 'between'. Is 50 miles out of the way 'between'? It all really depends on the trip. If you're only going 200 miles, then 50 miles off course is a lot, but if you're going 2400 miles (which is the distance from New York to California) then 50 miles isn't that big a deal. I dont know how well a computer would be able to decide this. Perhaps use a percentage of the trip distance.


halls-of-valhalla.org/images/affiliateLogo.png voodoorage.halls-of-valhalla.org/images/smallLogo.png
i537.photobucket.com/albums/ff338/ynori77/archenemysig1.jpg
ynori7 http://halls-of-valhalla.org
Author

RE: Help with script - Coders needed!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 02-01-09 21:01
ynori7 wrote:
You have to decide what exactly qualifies as 'between'. Is 50 miles out of the way 'between'? It all really depends on the trip. If you're only going 200 miles, then 50 miles off course is a lot, but if you're going 2400 miles (which is the distance from New York to California) then 50 miles isn't that big a deal. I dont know how well a computer would be able to decide this. Perhaps use a percentage of the trip distance.

Agreed. A great deal more would have to go into this, then. The city database definitely should be populated with x/y values to find the difference between cities along the trip and the "outlying" cities. Also, though, cities will have to be associated with highways / interstates that they lie on, and travel paths will have to be able to follow those in succession to arrive at the destination. Also, your x/y values will need to have the ability to be converted into mile / kilometer amounts to allow for user-specified judgment of what is "too far". Storing pre-determined paths to prominent cities couldn't hurt, either; would probably speed up discovery by a program.

Quite the complex task, that is.


Author

RE: Help with script - Coders needed!


Member

Your avatar

Posts:
Location:
Joined: 01.01.70
Rank:
Guest
Posted on 02-01-09 21:42
Yea and its frustrating because the person who I'm doing this work for doesn't know much about web development so he thinks if I can make a nice design on his site that I can do anything and everything.

Anyways, because this is only for the state of Indiana with the central point as Bloomington I thought I'd divide the state into sections like below.

img152.imageshack.us/img152/9192/indianamap2av4.jpg

And then depending on how far out of his way the driver wants to drop people off would be the number of lines separating the state.

I still would have no idea on where to begin coding this, but at least I've got some ideas.

Thanks for your responses guys.