|
| Makaleler |
| Toplam Makale |
3330 |
| Yayında |
3150 |
| Bekleyenler |
180 |
| Görüntüleme |
13324382 |
|
|
|
|
Kısa kısa örnekler...
Konu: PHP Yazar: Hasan Yaşar Tarih: 02/03/02
PHP:-
- <?php
-
-
-
-
-
- echo "Son güncelleme:<br>\n"; $last_modified = filemtime("$PHP_SELF");
- print(date("d.m.Y G:i", $last_modified));
- ?>
-
-
-
- <?php
-
-
-
-
-
-
-
- $dosya = "dosyam.txt"; $fd = fopen($dosya, "r");
-
- $satir=explode("\n",$fd);
-
- for($i=sizeof($satir); $i>=0; $i--)
- echo $satir[$i]."<br>";
- fclose($fd);
- ?>
-
-
- <?php
-
-
-
-
-
-
-
-
-
-
-
- $giden .= "Hatice Dumbacı <hatice@hotmail.com>" . ", " ; $giden .= "Zekerriyya
- Kara <zekk82@ejder.com>" . ", "; $giden .= "admin@turk-php.com";
-
-
-
- $baslik = "Php dökümanları";
-
-
-
- $mesaj = "aşağıda bir çok php dökümanı bulabilirsinizn"; $mesaj .=
- "attach yapıp gönderdim:) \n"; $mesaj .= "kendinize iyi bakınn";
-
-
-
- $header = "From: Turk-Php Servis <servis@turk-php.com>\n"; $header .= "X-
- Sender: <servis@turk-php.com>\n"; $header .= "X-Mailer: PHP\n"; $header .=
- "X-Priority: 1\n"; $header .= "Return-Path: <servis@turk-php.com>\n";
-
-
-
- $header .= "Content-Type: text/html; charset=iso-8859-1\n";
-
- $header .= "cc: kopya@hotmail.com\n"; $header .= "bcc: kopya@turk-php.com,
- kopya@ejder.com\n";
-
-
-
- mail($giden, $baslik, $mesaj, $header);
-
- ?>
-
-
- <?php
-
-
-
-
-
- function email_kontrol ($variable) {
-
- return (ereg('^[-!#$%&'*+\./0-9=?A-Z^_`a-z{|}~]+'. '@'.'[-!#$%&'*+\/0-9=?A-Z^_`a-z{|}~]+.' .
- '[-!
- }
-
- if ( email_kontrol($gidecekadres)) {
-
- mail($gidecekmail, "Konu", "Mesaj", "From:ben@ben.com");
-
- } else {
-
- echo "Hatalı mail adresi girdiniz...";
- }
- ?>
-
- <?php
-
-
-
-
-
-
-
-
-
- $konu = "deneme";
-
- $mesaj = "<html> kodlar </html>"; $mesaj .= "\n";
-
- $ustk = "From: xxx <xxx@xxx.com>\n"; $ustk .= "X-Sender: <xxx@xxx.com>\n";
- $ustk .= "X-Mailer: PHP\n"; $ustk .= "X-Priority: 3\n"; $ustk .= "Return-Path:
- <xxx@xxx.com>\n"; $ustk .= "Content-Type: text/html; charset=iso-8859-9\n";
-
- if ($dosya = (fopen ("mail.txt" , 'r') ) ) {
-
- while ( !feof ($dosya)){
-
- $satir = fgets ( $dosya, 50 );
-
- $satir=chop($satir);
-
- mail($satir, $konu, $mesaj, $ustk);
- }
-
- fclose ($dosya);
- print "İşlem tamam!";
- } else {
- print "Dosya Açılamıyor!";
- }
-
- ?>
-
- <?php
-
-
-
-
-
-
-
-
-
-
-
- ini_set("display_errors", 0);
-
- ?>
-
- <?php
-
-
-
- if ($HTTP_ACCEPT_LANGUAGE == tr)
-
- {
- header("Location:index_tr.php");
-
- }
- else
- {
- header("Location:index_en.php");
-
- }
- ?>
-
- <?php
-
-
-
-
-
- $reg = fopen("sayac.txt", "r");
-
- $line = fgets($reg,100); fclose($reg);
-
- $reg = fopen("sayac.txt", "w");
-
- $count = $line+1; fputs($reg,$count,100);
-
- echo "Ziyaretçi: $count";
-
- fclose($reg);
-
- ?>
-
- <?php
-
-
-
-
-
-
-
- srand(time());
-
- $var = file("linkler.txt");
-
- $foo = rand(1, sizeof($var));
-
- $l = $var[--$foo];
-
- $s = split("^",$l);
-
- echo "<a href="$s[0]">$s[1]</a>";
-
-
-
-
-
-
-
-
-
- ?>
-
-
- <?php
-
-
-
-
-
- function sifre($uzunluk) {
-
- $karakterler = "0123456789!@#$%^&*()_+"."abcdefghijklmnopqrstuvwxyz".
- "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
-
- $str = "";
-
- while(strlen($str) < $uzunluk) {
-
- $str .= substr($karakterler, (rand() % strlen($karakterler)), 1);
-
- }
-
- return($str);
-
- }
-
- echo sifre(10);
-
- ?>
Hasan Yaşar
Program: http://www.ejder.net/kucuk_ornekler.zip
Bu makale hakkında ek bilgi eklemek için buraya tıklayınız
Bu makalenin yazar yada kaynağını bildirmek için tıklayınız.
Eklenme tarihi: 3-2-2006 Okunma: 14131
|
| Bu Makaleye Verilen Puan: |
|
Kullanıcı Yorumları
Bu makaleye yorum gönderilmemiş, ilk yorumu sen gönder !
İlgili Dökümanlar
|
|
|