On Sun, Nov 9, 2008 at 1:24 PM, Mohan gupta <mohangupta13@xxxxxxxxx> wrote: > thanks man for replying ... > actually the program is my one made > iam trying to make a web crawler so iam using unix socket api's > as i use > write(sockfd,"GEt url HTTP 1.1\r\nHost:\r\n\r\n",30); > and then read it > read(sockfd,buf,sizeof(buf)); > > but i dont understand what do u mean by redirect ...i mean when someone > redirects it gives a nrw url to follow????? > where do you find that url in the reply if it does so??? When a server responds with an http result code of "302" it is telling you that the resource you requested really exists at some other urls. The "Location" header in the response contains the real URL for the resource. Your crawler should then request this redirect in stead. Browsers usually do this without the user even noticing it. However, if you really want to write your own crawler you should start by reading a bit about the http protocol. There are more result codes that your program might need to be aware of. Krist -- krist.vanbesien@xxxxxxxxx krist@xxxxxxxxxxxxx Bremgarten b. Bern, Switzerland -- A: It reverses the normal flow of conversation. Q: What's wrong with top-posting? A: Top-posting. Q: What's the biggest scourge on plain text email discussions? --------------------------------------------------------------------- The official User-To-User support forum of the Apache HTTP Server Project. See <URL:http://httpd.apache.org/userslist.html> for more info. To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx