Web Page Redirect?
itismyworld
Junior Member
Thought it would be cool to have a quote of the day come up on panel backgrounds. Actually having a hard time finding quote of the day websites. The main one that comes up apparently returns a "302". Which I guess is a redirect. Anyone know how to work this?
Sending:
BUTTON_EVENT [vdvTP,1250] // Query Quote
{
PUSH:
{
IP_CLIENT_OPEN(dvQuote.Port,'www.brainyquote.com',80,IP_TCP)
}
}
DATA_EVENT[dvQuote]
{
ONLINE: (* Socket connected *)
{
SEND_STRING dvQuote, "'GET /quotes_of_the_day.html HTTP/1.1',13,10"
SEND_STRING dvQuote, "'Host: brainyquote.com',13,10"
SEND_STRING dvQuote, "'Authorization: Basic',13,10"
SEND_STRING dvQuote, "'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.5',13,10"
SEND_STRING dvQuote, "13,10"
}
}
Receiving:
HTTP/1.1 302 Moved Temporarily
Date: Thu, 30 Jul 2015 04:21:05 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d42b81b0768f8204556834deb894e4b531438230065; expires=Fri, 29-Jul-16 04:21:05 GMT; path=/; domain=.brainyquote.com; HttpOnly
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Location: http://www.brainyquote.com/quotes_of_the_day.html
Server: cloudflare-nginx
CF-RAY: 20de465649060430-ORD.....
Thanks for any ideas!
Sending:
BUTTON_EVENT [vdvTP,1250] // Query Quote
{
PUSH:
{
IP_CLIENT_OPEN(dvQuote.Port,'www.brainyquote.com',80,IP_TCP)
}
}
DATA_EVENT[dvQuote]
{
ONLINE: (* Socket connected *)
{
SEND_STRING dvQuote, "'GET /quotes_of_the_day.html HTTP/1.1',13,10"
SEND_STRING dvQuote, "'Host: brainyquote.com',13,10"
SEND_STRING dvQuote, "'Authorization: Basic',13,10"
SEND_STRING dvQuote, "'User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.5',13,10"
SEND_STRING dvQuote, "13,10"
}
}
Receiving:
HTTP/1.1 302 Moved Temporarily
Date: Thu, 30 Jul 2015 04:21:05 GMT
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d42b81b0768f8204556834deb894e4b531438230065; expires=Fri, 29-Jul-16 04:21:05 GMT; path=/; domain=.brainyquote.com; HttpOnly
Cache-Control: private, max-age=0, no-store, no-cache, must-revalidate, post-check=0, pre-check=0
Expires: Thu, 01 Jan 1970 00:00:01 GMT
Location: http://www.brainyquote.com/quotes_of_the_day.html
Server: cloudflare-nginx
CF-RAY: 20de465649060430-ORD.....
Thanks for any ideas!
Comments
-
Most likely the problem is because you are askiling for the link from brainyquote.com, but their server wants you to get it from www.brainyquote.com. So change your online event Host: header line to this:
SEND_STRING dvQuote, "'Host: www.brainyquote.com',13,10"
And then you shouldn't get the 302.
-
Yup, that was it! Thank you sir!
Categories
- All Categories
- 2.5K AMX General Discussion
- 922 AMX Technical Discussion
- 514 AMX Hardware
- 502 AMX Control Products
- 3 AMX Video Distribution Products
- 9 AMX Networked AV (SVSI) Products
- AMX Workspace & Collaboration Products
- 3.4K AMX Software
- 151 AMX Resource Management Suite Software
- 386 AMX Design Tools
- 2.4K NetLinx Studio
- 135 Duet/Cafe Duet
- 248 NetLinx Modules & Duet Modules
- 57 AMX RPM Forum
- 228 MODPEDIA - The Public Repository of Modules for Everyone
- 943 AMX Specialty Forums
- 2.6K AMXForums Archive
- 2.6K AMXForums Archive Threads
- 1.5K AMX Hardware
- 432 AMX Applications and Solutions
- 249 Residential Forum
- 182 Tips and Tricks
- 146 AMX Website/Forums