Android http code response code status code, androidcode

Source: Internet
Author: User
Tags unsupported

Android http code response code status code, androidcode

  1. Some common status codes are:
  2. 200-the server returns the webpage successfully
  3. 404-the requested webpage does not exist
  4. 503-server timeout
  5. The complete list of HTTP status codes is provided below.
  6. 1xx (temporary response)
  7. Status Code indicating a temporary response and requiring the requester to continue the operation.
  8. 100 (CONTINUE) the requester shall continue to make the request. The server returns this code, indicating that the first part of the request has been received and is waiting for the remaining part.
  9. 101 (switching protocol) the requester has requested the server switching protocol. The server has confirmed and is ready to switch.
  10. 2xx (successful)
  11. Indicates that the request status code is successfully processed.
  12. 200 (successful) the server has successfully processed the request. Generally, this indicates that the server provides the requested webpage. If this status code is displayed for your robots.txt file, it indicates that Googlebot has successfully retrieved the file.
  13. The 201 (created) request is successful and the server creates a new resource.
  14. 202 (accepted) the server has accepted the request but has not yet processed it.
  15. 203 (unauthorized information) the server has successfully processed the request, but the returned information may come from another source.
  16. 204 (NO content) The server successfully processed the request, but did not return any content.
  17. 205 (reset content) The server successfully processed the request, but did not return any content. Unlike the 204 response, this response requires the requester to reset the document view (for example, clear the form content to enter new content ).
  18. 206 (partial content) The server successfully processes some GET requests.
  19. 3xx (redirection)
  20. Further operations are required to complete the request. These status codes are usually used for redirection. Google recommends that you use redirection no more than 5 times in each request. You can use the website administrator tool to check if Googlebot encounters any problems when crawling the redirected webpage. The web capture page under diagnosis lists URLs that cannot be crawled by Googlebot due to redirection errors.
  21. 300 (multiple options) for requests, the server can perform multiple operations. The server selects an operation based on the user agent or provides an operation list for the user agent to select.
  22. The webpage of the 301 (permanent mobile) request has been permanently moved to a new location. When the server returns this response (response to a GET or HEAD request), it automatically redirects the requester to a new location. You should use this code to tell Googlebot that a webpage or website has been permanently moved to a new location.
  23. The 302 (temporary mobile) server currently responds to requests from different locations, but the requester should continue to use the original location to respond to subsequent requests. Similar to code 301 In response to GET and HEAD requests, this code automatically redirects the requester to different locations. However, you should not use this code to tell Googlebot that a webpage or website has been moved, because Googlebot will continue to capture the original location and compile the index.
  24. 303 (view other locations) when the requester uses a separate GET request for different locations to retrieve the response, the server returns this code. For all requests except HEAD, the server automatically redirects to other locations.
  25. 304 (not modified) the requested webpage has not been modified since the last request. When the server returns this response, no webpage content is returned.
  26. If the webpage has not been changed Since the last request, you should Configure the server to return this response (known as the If-Modified-Since HTTP header ). The server can tell Googlebot that the webpage has not changed since the previous capture, thus saving bandwidth and overhead.
  27. 305 (using a proxy) the requester can only use a proxy to access the requested webpage. If the server returns this response, it also indicates that the requester should use a proxy.
  28. 307 (temporary redirection) The server currently responds to requests from different locations, but the requester should continue to use the original location to respond to subsequent requests. Similar to code 301 In response to GET and HEAD requests, this code automatically redirects the requester to different locations. However, you should not use this code to tell Googlebot that a page or website has been moved, because Googlebot will continue to capture the original location and compile the index.
  29. 4xx (request error)
  30. These status codes indicate that the request may fail and impede server processing.
  31. 400 (incorrect request) the server does not understand the request syntax.
  32. 401 (unauthorized) requests require authentication. The server may return this response for the webpage requested after logon.
  33. 403 (Forbidden) The server rejects the request. If you see this status code when Googlebot tries to capture a valid webpage on your website (you can see this information on the web capture page diagnosed by Google's website administrator tool ), it may be that your server or host rejects Googlebot access.
  34. 404 (not found) The server cannot find the requested webpage. For example, this code is often returned for webpages that do not exist on the server.
  35. If the robots.txt file does not exist on your website and you see this status code on the robots.txt page of the Google website administrator tool "Diagnostics" tab, this is the correct status code. However, if you have a robots.txt file and you see this status code, it indicates that your robots.txt file may be named incorrectly or in an incorrect location (the file should be in a top-level domain named robots.txt ).
  36. If you see this status code for the URL crawled by Googlebot (on the HTTP Error page of the "diagnosis" tab ), it indicates that Googlebot may follow the invalid link of another page (the old link or incorrect link entered ).
  37. 405 (method disabled) disable the method specified in the request.
  38. 406 (unacceptable) unable to respond to the requested webpage using the requested content features.
  39. 407 (proxy authorization required) this status code is similar to 401 (unauthorized), but the specified requester should authorize the use of the proxy. If the server returns this response, it also indicates that the requester should use a proxy.
  40. 408 (request timeout) timeout occurred when the server waited for the request.
  41. 409 conflict occurs when the server completes the request. The server must contain conflict information in the response. When the server responds to a PUT request that conflicts with the previous request, it may return this code and a list of differences between the two requests.
  42. 410 (Deleted) If the requested resource has been permanently deleted, the server returns this response. This code is similar to the 404 (not found) code, but sometimes it is used to replace the 404 code when the resource exists before and does not exist. If the resource has been moved permanently, you should use 301 to specify a new location for the resource.
  43. The 411 (valid length required) server does not accept requests that do not contain valid Content Length header fields.
  44. 412 (not meeting the prerequisites) the server does not meet one of the prerequisites set by the requester in the request.
  45. 413 (the Request Entity is too large) The server cannot process the request because the request entity is too large and exceeds the server's processing capability.
  46. 414 (the requested URI is too long) The request URI (usually the URL) is too long and cannot be processed by the server.
  47. 415 (unsupported media type) The request format is not supported by the request page.
  48. 416 (the request range does not meet the requirements) if the page cannot provide the request range, the server returns this status code.
  49. 417 (not meeting expectations) the server does not meet the "expectation" request header field requirements.
  50. 5xx (server error)
  51. These status codes indicate an internal error occurred when the server processes the request. These errors may be server errors rather than request errors.
  52. 500 (internal server error) The server encounters an error and cannot complete the request.
  53. 501 (not implemented) the server does not have the function to complete the request. For example, this Code may be returned when the server cannot identify the request method.
  54. The 502 (error gateway) server acts as a gateway or proxy and receives an invalid response from the upstream server.
  55. 503 (Service unavailable) servers are currently unavailable (due to overload or downtime maintenance ). Generally, this is only a temporary status.
  56. 504 (gateway timeout) The server acts as a gateway or proxy, but does not receive a request from the upstream server in time.
  57. 505 (HTTP Version Not Supported) the server does not support the HTTP protocol version used in the request.
  58. // All
  59. $ Http_code ["0"] = "Unable to access ";
  60. $ Http_code ["100"] = "Continue ";
  61. $ Http_code ["101"] = "Switching Protocols ";
  62. $ Http_code ["200"] = "OK ";
  63. $ Http_code ["201"] = "Created ";
  64. $ Http_code ["202"] = "Accepted ";
  65. $ Http_code ["203"] = "Non-Authoritative Information ";
  66. $ Http_code ["204"] = "No Content ";
  67. $ Http_code ["205"] = "Reset Content ";
  68. $ Http_code ["206"] = "Partial Content ";
  69. $ Http_code ["300"] = "Multiple Choices ";
  70. $ Http_code ["301"] = "Moved Permanently ";
  71. $ Http_code ["302"] = "Found ";
  72. $ Http_code ["303"] = "See Other ";
  73. $ Http_code ["304"] = "Not Modified ";
  74. $ Http_code ["305"] = "Use Proxy ";
  75. $ Http_code ["306"] = "(Unused )";
  76. $ Http_code ["307"] = "Temporary Redirect ";
  77. $ Http_code ["400"] = "Bad Request ";
  78. $ Http_code ["401"] = "Unauthorized ";
  79. $ Http_code ["402"] = "Payment Required ";
  80. $ Http_code ["403"] = "Forbidden ";
  81. $ Http_code ["404"] = "Not Found ";
  82. $ Http_code ["405"] = "Method Not Allowed ";
  83. $ Http_code ["406"] = "Not Acceptable ";
  84. $ Http_code ["407"] = "Proxy Authentication Required ";
  85. $ Http_code ["408"] = "Request Timeout ";
  86. $ Http_code ["409"] = "Conflict ";
  87. $ Http_code ["410"] = "Gone ";
  88. $ Http_code ["411"] = "Length Required ";
  89. $ Http_code ["412"] = "Precondition Failed ";
  90. $ Http_code ["413"] = "Request Entity Too Large ";
  91. $ Http_code ["414"] = "Request-URI Too Long ";
  92. $ Http_code ["415"] = "Unsupported Media Type ";
  93. $ Http_code ["416"] = "Requested Range Not Satisfiable ";
  94. $ Http_code ["417"] = "Expectation Failed ";
  95. $ Http_code ["500"] = "Internal Server Error ";
  96. $ Http_code ["501"] = "Not Implemented ";
  97. $ Http_code ["502"] = "Bad Gateway ";
  98. $ Http_code ["503"] = "Service Unavailable ";
  99. $ Http_code ["504"] = "Gateway Timeout ";
  100. $ Http_code ["505"] = "HTTP Version Not Supported ";
  101. $ Ch = curl_init ();
  102. $ Url = "http://www.ganguoyuan.com/#;
  103. Curl_setopt ($ ch, CURLOPT_URL, $ url );
  104. Curl_setopt ($ ch, CURLOPT_HEADER, 1 );
  105. Curl_setopt ($ ch, CURLOPT_TIMTOUT, 2 );
  106. Curl_setopt ($ ch, CURLOPT_NOBODY, 1 );
  107. $ Out = curl_exec ($ ch );
  108. $ IntReturnCode = curl_getinfo ($ ch, CURLINFO_HTTP_CODE );
  109. Curl_close ($ ch );

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.