Real Time Train Tracker

Amtrak Unlimited Discussion Forum

Help Support Amtrak Unlimited Discussion Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.
Status
Not open for further replies.
The train tracker is looking for an HTTP Referer of http://www.amtrak.com/home. There are browser plugins that allow you to specify the referer that you want to send to a particular site. I just tried one called Referer Control in Chrome that seems to work fine. If you want to try it, your settings should look like this:

referer.png
That's a good start. But how do I set up a link on an existing page with HTML or javascript to set up that referer without using a plugin?

Thanks,

jb
Not sure, but perhaps you could do some kind of AJAX request where you could inject the referrer in the request, then dump the output to a blank DIV. Otherwise, seems like you have to build some kind of backend processing that builds the request manually at the server on page request - similar to how Google search results refer to itself before direction one to the actual URL.
 
I was looking into this. Consensus seems to be that it isn't possible as browsers do not ship with the ability to send a fake referrer header so there is no way to write a script that will make this happen. Referrer headers can be hidden (i.e. not sent) but this won't help if the site is looking for a particular referrer in order to display.

Solutions:

1. Download a referrer-spoofing add-on and set the referrer for www.amtrak.com to www.amtrak.com/train-routes. I just did this in Firefox and I can now bookmark www.amtrak.com/trainlocationmap and it works.

2. Write a server-side script that spoofs the referrer header, gets the target URL, and displays it from your own server. Aside from being illegal from a copyright perspective, it doesn't work. I tried it for the heck of it and the Google Maps API recognizes the incorrect domain and fails to execute map loading.

So I think we are stuck with an individual-level solution in terms of direct linking.
 
I was looking into this. Consensus seems to be that it isn't possible as browsers do not ship with the ability to send a fake referrer header so there is no way to write a script that will make this happen. Referrer headers can be hidden (i.e. not sent) but this won't help if the site is looking for a particular referrer in order to display.

Solutions:

1. Download a referrer-spoofing add-on and set the referrer for www.amtrak.com to www.amtrak.com/train-routes. I just did this in Firefox and I can now bookmark www.amtrak.com/trainlocationmap and it works.

2. Write a server-side script that spoofs the referrer header, gets the target URL, and displays it from your own server. Aside from being illegal from a copyright perspective, it doesn't work. I tried it for the heck of it and the Google Maps API recognizes the incorrect domain and fails to execute map loading.

So I think we are stuck with an individual-level solution in terms of direct linking.
Anir,

I tried something similar to number 2 and didn't get too far.

I think there might be a third solution, speaking from a theoretical perspective. If a third party website like NARP or DixielandSoftware were to provide a link, and Amtrak had the map provider to allow those referrers, it would work. But someone, most likely NARP, would have to convince Amtrak to go along with it.

jb
 
I am not very computer saavy. But I suspect that Amtrak wants to insure that their tracker is propietary to their own website for access, and not allow outside websites to exploit it by providing direct links. Could that be it?
 
Last edited by a moderator:
I was looking into this. Consensus seems to be that it isn't possible as browsers do not ship with the ability to send a fake referrer header so there is no way to write a script that will make this happen. Referrer headers can be hidden (i.e. not sent) but this won't help if the site is looking for a particular referrer in order to display.

Solutions:

1. Download a referrer-spoofing add-on and set the referrer for www.amtrak.com to www.amtrak.com/train-routes. I just did this in Firefox and I can now bookmark www.amtrak.com/trainlocationmap and it works.

2. Write a server-side script that spoofs the referrer header, gets the target URL, and displays it from your own server. Aside from being illegal from a copyright perspective, it doesn't work. I tried it for the heck of it and the Google Maps API recognizes the incorrect domain and fails to execute map loading.

So I think we are stuck with an individual-level solution in terms of direct linking.
Anir,

I tried something similar to number 2 and didn't get too far.

I think there might be a third solution, speaking from a theoretical perspective. If a third party website like NARP or DixielandSoftware were to provide a link, and Amtrak had the map provider to allow those referrers, it would work. But someone, most likely NARP, would have to convince Amtrak to go along with it.

jb
Well yes if Amtrak approves a site as a referrer then there is no issue. Given that this map is likely to become the most-visited and most-bookmarked page on their website, they might be convinced to allow direct linking. The problem with this currently is that the map is designed as a pop-up so the direct-linked page doesn't contain any links back to amtrak.com or ticketing.
 
Anir,

How about something that takes the user to the actual Amtrak website but somehow preselects the Tracker, so that the Amtrak web page opens up but with the Tracker already opened up as well? That would avoid any copyright issues.

jb
 
Unless there is a URL for the page with the tracker open, I don't think this would work. Convincing Amtrak to create such a URL might not be too hard though, as it wouldn't circumvent their interests in any way.
 
Just discovered the new Track-a-Train feature on the Amtrak home page. Very cool, although using it is confusing at first, at least to me. How long has it been around?
 
Status
Not open for further replies.
Back
Top