[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with Example15
I am attempting Scott's new Example15 where he retrieves the top news
stories from cnn.
The biggest hurdle right now is that our shop DNS has been disabled on
our development box so nothing goes out accidentally. I have been
told that DNS nor host table entries will be allowed. I also read the
notes at ([1]http://www.scottklement.com/httpapi/dns.html).
For this reason I am hard coding an IP address in place of the host
name.
I retrieved the IP by (ping [2]rss.cnn.com) from my PC which did allow
me to ping cnn.
I then changed the folllowing url
// ****************************************************
// Download the latest news headlines from CNN
// to a temporary file in the IFS
// ****************************************************
// url = '[3]http://rss.cnn.com/rss/cnn_topstories.rss';
url = '[4]http://74.125.93.121/rss/cnn_topstories.rss';
I have successfully run examples EXAMPLE18 and EXAMPLE19 using this
same approach.
When I try the cnn example my httpapi_debug.txt contains
<snip>
HTTPAPI Ver 1.23 released 2008-04-24
OS/400 Ver V6R1M0
New iconv() objects set, PostRem=819. PostLoc=0. ProtRem=819.
ProtLoc=0
http_url_get(): entered
http_persist_open(): entered
http_long_ParseURL(): entered
DNS resolver retrans: 2
DNS resolver retry : 2
DNS resolver options: x'00000136'
DNS default domain: [5]KOHLANDFRISCH.COM
WARNING: No name servers are configured for DNS resolution! You will
not be able to contact Internet hosts! See
[6]http://www.scottklement.com/httpapi/dns.html for more information.
http_persist_get(): entered
http_long_ParseURL(): entered
do_get(): entered
GET /rss/cnn_topstories.rss HTTP/1.1
Host: 74.125.93.121
User-Agent: http-api/1.23
recvresp(): entered
HTTP/1.1 404 Not Found
Date: Fri, 06 Aug 2010 12:35:17 GMT
Content-Type: text/html; charset=UTF-8
Server: ghs
Content-Length: 1376
X-XSS-Protection: 0
SetError() #13: HTTP/1.1 404 Not Found
recvdoc parms: identity 1376
header_load_cookies() entered
recvdoc(): entered
SetError() #0:
</snip>
Does anyone have any suggestions of alternate methods or why I am
getting the 404 error? When I type in the address on my PC it works
file.
Thanks,
Rob
The following is in httpapi_debug.txt after an attempt.
References
1. http://www.scottklement.com/httpapi/dns.html
2. http://rss.cnn.com/
3. http://rss.cnn.com/rss/cnn_topstories.rss
4. http://74.125.93.121/rss/cnn_topstories.rss
5. http://KOHLANDFRISCH.COM/
6. http://www.scottklement.com/httpapi/dns.html
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------