# Passing to a website



## balloon_tom (Jan 5, 2006)

Good morning all.
I'm having difficulty creating the address line for a website. The main web address is:

http://aa.usno.navy.mil/

Upon entering the site, I can select DATA SERVICES and then either "COMPLETE SUN AND MOON DATA FOR ONE DAY" or "TABLE OF SUNRISE/SUNSET...FOR AN ENTIRE YEAR". I have no problem with the second option. My address line is:

http://aa.usno.navy.mil/cgi-bin/aa_...2=30&yy0=1&yy1=35&yy2=15&zz0=-1&zz1=4&ZZZ=END

What I can't get to work is the first option. I think it should be:

http://aa.usno.navy.mil/cgi-bin/aa_...2=30&yy0=1&yy1=35&yy2=15&zz0=-1&zz1=4&ZZZ=END

which is the same line replacing 'rstablew' with pap, and adding the month and day: xxm=9 and xxd=4. It doesn't like it.

Can you please take a look at the source code for option 1, COMPLETE...FOR 1 DAY, and figure out what I'm missing.

FFX=2...FORM 2
xxy=2006...year
xxm=9...month
xxd=4...day
xx0=-1...west longitude
xx1=078...degrees longitude
xx2=30...minutes longitude
yy0=1...north latitude
yy1=38...degrees latitude
yy2=30...minutes latitude
zz0=-1...time zone west of Greenwich
zz1=4... 4 hours

Thanks,
Tom


----------



## balloon_tom (Jan 5, 2006)

Sorry guys, I just noticed that most of the addresses didn't show up as text in my post. I'll try again. These are the addresses excluding the http:// prefix:

This is the one that works:

aa.usno.navy.mil/cgi-bin/aa_rstablew.pl?FFX=2&xxy=2006&xx0=-1&xx1=078&xx2=30&yy0=1&yy1=35&yy2=15&zz0=-1&zz1=4&ZZZ=END

This is the one that I need to get working:

aa.usno.navy.mil/cgi-bin/aa_pap.pl?FFX=2&id=AA&xxy=2006&xxm=9&xxd=4&xx0=-1&xx1=078&xx2=30&yy0=1&yy1=35&yy2=15&zz0=-1&zz1=4&ZZZ=END

I hope this now makes more sense.
Tom


----------



## Genidiot (May 25, 2006)

I played around with this for longer than I'd care to admit. Here is an Ethereal packet transmitted from my machine that did work from the following source HTML:


```

```


```
0000  00 17 95 fd 5e 41 00 0d  60 dd ad ce 08 00 45 00   ....^A.. `.....E.
0010  02 7f 80 22 40 00 80 06  00 00 0a 50 0a dc c6 74   ..."@... ...P...t
0020  3d 5d 0c 84 00 50 59 c0  a7 53 05 fe 70 21 50 18   =]...PY. .S..p!P.
0030  ff ff 1b 6f 00 00 50 4f  53 54 20 2f 63 67 69 2d   ...o..PO ST /cgi-
0040  62 69 6e 2f 61 61 5f 70  61 70 2e 70 6c 20 48 54   bin/aa_p ap.pl HT
0050  54 50 2f 31 2e 31 0d 0a  41 63 63 65 70 74 3a 20   TP/1.1.. Accept: 
0060  69 6d 61 67 65 2f 67 69  66 2c 20 69 6d 61 67 65   image/gi f, image
0070  2f 78 2d 78 62 69 74 6d  61 70 2c 20 69 6d 61 67   /x-xbitm ap, imag
0080  65 2f 6a 70 65 67 2c 20  69 6d 61 67 65 2f 70 6a   e/jpeg,  image/pj
0090  70 65 67 2c 20 61 70 70  6c 69 63 61 74 69 6f 6e   peg, app lication
00a0  2f 78 2d 73 68 6f 63 6b  77 61 76 65 2d 66 6c 61   /x-shock wave-fla
00b0  73 68 2c 20 61 70 70 6c  69 63 61 74 69 6f 6e 2f   sh, appl ication/
00c0  76 6e 64 2e 6d 73 2d 65  78 63 65 6c 2c 20 61 70   vnd.ms-e xcel, ap
00d0  70 6c 69 63 61 74 69 6f  6e 2f 76 6e 64 2e 6d 73   plicatio n/vnd.ms
00e0  2d 70 6f 77 65 72 70 6f  69 6e 74 2c 20 61 70 70   -powerpo int, app
00f0  6c 69 63 61 74 69 6f 6e  2f 6d 73 77 6f 72 64 2c   lication /msword,
0100  20 2a 2f 2a 0d 0a 41 63  63 65 70 74 2d 4c 61 6e    */*..Ac cept-Lan
0110  67 75 61 67 65 3a 20 65  6e 2d 75 73 0d 0a 43 6f   guage: e n-us..Co
0120  6e 74 65 6e 74 2d 54 79  70 65 3a 20 61 70 70 6c   ntent-Ty pe: appl
0130  69 63 61 74 69 6f 6e 2f  78 2d 77 77 77 2d 66 6f   ication/ x-www-fo
0140  72 6d 2d 75 72 6c 65 6e  63 6f 64 65 64 0d 0a 41   rm-urlen coded..A
0150  63 63 65 70 74 2d 45 6e  63 6f 64 69 6e 67 3a 20   ccept-En coding: 
0160  67 7a 69 70 2c 20 64 65  66 6c 61 74 65 0d 0a 55   gzip, de flate..U
0170  73 65 72 2d 41 67 65 6e  74 3a 20 4d 6f 7a 69 6c   ser-Agen t: Mozil
0180  6c 61 2f 34 2e 30 20 28  63 6f 6d 70 61 74 69 62   la/4.0 ( compatib
0190  6c 65 3b 20 4d 53 49 45  20 36 2e 30 3b 20 57 69   le; MSIE  6.0; Wi
01a0  6e 64 6f 77 73 20 4e 54  20 35 2e 31 3b 20 53 56   ndows NT  5.1; SV
01b0  31 3b 20 2e 4e 45 54 20  43 4c 52 20 31 2e 31 2e   1; .NET  CLR 1.1.
01c0  34 33 32 32 3b 20 2e 4e  45 54 20 43 4c 52 20 31   4322; .N ET CLR 1
01d0  2e 30 2e 33 37 30 35 3b  20 2e 4e 45 54 20 43 4c   .0.3705;  .NET CL
01e0  52 20 32 2e 30 2e 35 30  37 32 37 29 0d 0a 48 6f   R 2.0.50 727)..Ho
01f0  73 74 3a 20 61 61 2e 75  73 6e 6f 2e 6e 61 76 79   st: aa.u sno.navy
0200  2e 6d 69 6c 0d 0a 43 6f  6e 74 65 6e 74 2d 4c 65   .mil..Co ntent-Le
0210  6e 67 74 68 3a 20 36 34  0d 0a 43 6f 6e 6e 65 63   ngth: 64 ..Connec
0220  74 69 6f 6e 3a 20 4b 65  65 70 2d 41 6c 69 76 65   tion: Ke ep-Alive
0230  0d 0a 43 61 63 68 65 2d  43 6f 6e 74 72 6f 6c 3a   ..Cache- Control:
0240  20 6e 6f 2d 63 61 63 68  65 0d 0a 0d 0a 46 46 58    no-cach e....FFX
0250  3d 31 26 49 44 3d 4a 6f  65 42 26 78 78 79 3d 32   =1&ID=Jo eB&xxy=2
0260  30 30 35 26 78 78 6d 3d  31 26 78 78 64 3d 33 30   005&xxm= 1&xxd=30
0270  26 73 74 3d 43 4f 26 70  6c 61 63 65 3d 4c 6f 76   &st=CO&p lace=Lov
0280  65 6c 61 6e 64 26 5a 5a  5a 3d 45 4e 44            eland&ZZ Z=END
```
Hopefully it will help you some, but I didn't get anywhere really.


----------



## balloon_tom (Jan 5, 2006)

Thanks for all of your efforts, Genidiot. I'm afraid that I may have presented this task in a manner that makes it seem more difficult than I think it is. I'm not trying to create a HTML code, just a URL. Please copy the following URL and paste it into your browser address line. The result should be a chart of sunrise and sunset times for the entire year.

aa.usno.navy.mil/cgi-bin/aa_rstablew.pl?FFX=2&xxy=2006&xx0=-1&xx1=078&xx2=30&yy0=1&yy1=35&yy2=15&zz0=-1&zz1=4&ZZZ=END

You should have also received the chart. This part works great.

This next URL should produce sun and moon data for one day only. If you paste it into your address line you'll probably get the same error that I do: No State Specified, No city Specified.

aa.usno.navy.mil/cgi-bin/aa_pap.pl?FFX=2&id=AA&xxy=2006&xxm=9&xxd=4&xx0=-1&xx1=078&xx2=30&yy0=1&yy1=35&yy2=15&zz0=-1&zz1=4&ZZZ=END

The way I read the source code, which I'm not very good at, FFX=2 allows for lat/lon coordinates instead of place & state as in FFX=1. The only way I know how to get to their source code is to click:

http://aa.usno.navy.mil/CSS/DEFAULT.CSS
and then select "DATA SERVICES" and then select one of the two first choices under "RISE/SET/TRANSIT/TWILIGHT DATA". The second option is the one that works above. The first option is the one I can't get to work. Please don't give up and feel free to ask for any clarification. Tom


----------



## Genidiot (May 25, 2006)

Yeah, I did all that too. I get "Sorry, date cannot be processed." as well. 

My best guess was that they changed the name of parameters or something, but the Ethereal log didn't seem to show that. What you are doing looks like it should work to me, which is why I am confused as well. It's hard to do without the aa_pap.pl source code or at least documentation, and I Googled the planet looking for those.


----------



## Genidiot (May 25, 2006)

It could be protected, http://www.smartfellowspress.com/iago2004/_Iago_0304/00000084.htm . Or, you might need to write HTML that sets the base address to the "mach" page.


----------

