If you want to make outgoing http connections with php, concider the curl extension.
HTTP İşlevleri
Evvelce bu sayfada listelenen HTTP ile ilgili yerleşik işlevleri ağ işlevleri bölümünde bulabilirsiniz.
HTTP modülünün varlığını gerektirmeyen işlevler: header(), headers_list(), headers_sent(), setcookie() ve setrawcookie().
İşlev grupları
Önbellekleme
Çeşitli
Çıktı eylemciler
İstekler
Yanıtlar
URL'ler
İçindekiler
- http_cache_etag — Önbellekleme ETag'a göre yapılır
- http_cache_last_modified — Önbellekleme son değişikliğe göre yapılır
- http_chunked_decode — Parça parça kodlanmış verinin kodunu açar
- http_deflate — Veriyi sıkıştırır
- http_inflate — Verinin sıkıştırmasını açar
- http_build_cookie — Çerez dizgesi derler
- http_date — HTTP RFC'sine uygun bir tarih oluşturur
- http_get_request_body_stream — İstek gövdesini bir akım olarak döndürür
- http_get_request_body — İstek gövdesini bir dizge olarak döndürür
- http_get_request_headers — İstek başlıklarını bir dizi olarak döndürür
- http_match_etag — ETag ile eşleşir
- http_match_modified — Son değişiklikle eşleşir
- http_match_request_header — Herhangi bir başlıkla eşleşir
- http_support — Yerleşik HTTP desteğini sınar
- http_negotiate_charset — İstemcinin tercih ettiği karakter kümesinde uzlaşır
- http_negotiate_content_type — İstemcinin tercih ettiği içerik türünde uzlaşır
- http_negotiate_language — İstemcinin tercih ettiği dille uzlaşır
- ob_deflatehandler — Sıkıştırılmış çıktı eylemcisi
- ob_etaghandler — ETag çıktı eylemcisi
- ob_inflatehandler — Sıkıştırmayı açan çıktı eylemcisi
- http_parse_cookie — HTTP çerezlerini çözümler
- http_parse_headers — HTTP başlıkların çözümler
- http_parse_message — HTTP iletilerini çözümler
- http_parse_params — Değiştirge listesini çözümler
- http_persistent_handles_clean — Kalıcı tanıtıcıları temizler
- http_persistent_handles_count — Kalıcı tanıtıcıları durumlar
- http_persistent_handles_ident — Kalıcı tanıtıcılar için kimlik atar/döndürür
- http_get — GET isteği yapar
- http_head — HEAD isteği yapar
- http_post_data — Önkodlamalı veri ile POST isteği yapar
- http_post_fields — Kodlanacak veri ile POST isteği yapar
- http_put_data — Verili PUT isteği yapar
- http_put_file — Dosyalı PUT isteği yapar
- http_put_stream — Akımlı PUT isteği yapar
- http_request_body_encode — İstek gövdesini kodlar
- http_request_method_exists — İstek yöntemi kayıtlı mı diye bakar
- http_request_method_name — İstek yönteminin ismini döndürür
- http_request_method_register — İstek yöntemini kayıtlı duruma getirir
- http_request_method_unregister — İstek yöntemini kayıtdışı yapar
- http_request — Özel bir istek yapar
- http_redirect — HTTP yönlendirmesi yapar
- http_send_content_disposition — Content-Disposition başlığını gönderir
- http_send_content_type — Content-Type başlığını gönderir
- http_send_data — Keyfi veri gönderir
- http_send_file — Dosya gönderir
- http_send_last_modified — Last-Modified başlığını gönderir
- http_send_status — HTTP yanıt durum kodu gönderir
- http_send_stream — Akımı gönderir
- http_throttle — HTTP band genişliğini kısar
- http_build_str — Sorgu dizgesi derler
- http_build_url — Bir URL derler
henke dot andersson at comhem dot se
14-Jan-2006 01:01
woei at xs4all dot nl
30-Nov-2005 07:57
Actually, if you want to redirect a user why let HTML or JavaScript do it? Simply do this:
header("Location: http://www.example.com/");
WeeJames
07-Jul-2004 11:39
Regarding what the guy before said. We've experienced problems where certain firewalls have encrypted the HTTP_REFERER meaning that it doesnt always contain the place you've come from.
Better to track where the user has come from either in a form post or in the url.
27-Apr-2004 07:05
in reference to toashwinisidhu's and breaker's note, a more effective way would be to use meta-tag redirect, for example.
<?php
$url = "http://somesite.com/index.php"; // target of the redirect
$delay = "3"; // 3 second delay
echo '<meta http-equiv="refresh" content="'.$delay.';url='.$url.'">';
?>
The meta goes in the head of the HTML.
This method does not require javascript and is supported by most browsers and is rarely, if ever, filterd out.
toashwinisidhu at yahoo dot com
21-Apr-2004 03:55
The method given below may not sometimes work.
The following method has always worked with me:
just put the following 3 lines in your PHP code
?>
<body onload=setTimeout("location.href='$url'",$sec)>
<?PHP
-------?>
$sec is the time in second after which the browser would automatically go to the url. Set it to 0 if you do not want to give any time.
You can use this function on the events of various html/form objects (eg.-onclick for button).eg.
<input type=button value="Go to Php.net" onclick=setTimeout("location.href='php.net'",0)>
Use this to one step back
<input type="button" value="Back" onclick=history.go(-1)>
jeffp-php at outofservice dot com
04-Jan-2001 08:37
$HTTP_RAW_POST_DATA --
You'll usually access variables from forms sent via POST method by just accessing the associated PHP global variable.
However, if your POST data is not URI encoded (i.e., custom application that's not form-based) PHP won't parse the data into nice variables for you. You will need to use $HTTP_RAW_POST_DATA to access the raw data directly. (This should return a copy of the data given to the PHP process on STDIN; note that you wan't be able to open STDIN and read it yourself because PHP already did so itself.)
