URL Spider using NSURL
URL Spider using NSURL
- Subject: URL Spider using NSURL
- From: Dalton Hamilton <email@hidden>
- Date: Thu, 4 Oct 2007 19:53:31 -0400
I've written an application that some may consider a web crawler or
spider but really downloads a url you enter and then it opens that
page and finds all http:// references in the page and goes and gets
those pages and continues that process growing exponentially -- (it
operates in this crawler mode if the "Harvest" switch is turned on).
The purpose of the code is to generate web requests to test various
vendors Web proxies. I'm looking for someone (or multiple people) to
help me improve it. I'd be willing to zip the Xcode project (it is
small) and email it to anyone that would be willing to help me improve
it. I have never started any type of code base (like check-in and
check-out or cooperative coding effort type of thing) so I figured I'd
just email the code. The code basically does the below -- please
email dalton dot hamilton at mac dot com if you would like to help:
The code uses NSURLRequest and NSURLDownload in the following way:
NSURLRequest *theRequest=[NSURLRequest requestWithURL:[NSURL
URLWithString:urlToGet]
cachePolicy:NSURLRequestUseProtocolCachePolicy
timeoutInterval
:60.0];
NSURLDownload *theDownload=[[NSURLDownload alloc]
initWithRequest:theRequest delegate:self];
The code then receives the callback by supporting the following methods:
- (void)download:(NSURLDownload *)download didFailWithError:(NSError
*)error
-(void)download:(NSURLDownload *)download
didReceiveAuthenticationChallenge:(NSURLAuthenticationChallenge
*)challenge
- (void)downloadDidBegin:(NSURLDownload *)download
- (void)download:(NSURLDownload *)download didReceiveDataOfLength:
(unsigned)length
- (void)downloadDidFinish:(NSURLDownload *)download
Kind Regards.
Dalton Hamilton
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Macnetworkprog mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden