K
K
Koal Koalich2017-08-22 11:04:40
HTTP headers
Koal Koalich, 2017-08-22 11:04:40

Examples of 300, 304, and 305 redirects?

Please show pages with competent examples of redirects with codes 300, 304 and 305. You need to test a piece of code:

switch($info['http_code'])
                {
                    //сделать примеры перенаправлений: 300, 304, 305
                    case '300':
                        
                        break;
                    case '301':
                    case '302':
                    case '303':
                    case '307':
                        preg_match('/Location:(.*?)\n/', $curl_result, $matches);
                        //echo trim(array_pop($matches));
                        $course_health_info = code3xx($url, $course_name, trim(array_pop($matches)), 10);
                        break;
                    case '304':
                        
                        break;
                    case '305':
                        
                        break;
                    default:
                        //некорректный ответ!
                        $course_health_info = $info['http_code'].' Ошибка! Возможно, курс \''.$course_name. '\' недоступен! См. адрес '.$url;

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question