• Downloading from our site will require you to have a paid membership. Upgrade to a Premium Membership from 10$ a month today!

    Dont forget read our Rules! Also anyone caught Sharing this content will be banned. By using this site you are agreeing to our rules so read them. Saying I did not know is simply not an excuse! You have been warned.

Share lại code tạo chữ lồng

Admin

Well-Known Member
Staff member
Administrator
Tạo file ví dụ tuoitrevn_chulong.php
Dán code này vào
<?php
if(isset($_POST['a']) && isset($_POST['b'])){
$a = $_POST['a'];
$b = $_POST['b'];
$ab = strtolower($a).strtolower($b);
if(file_exists('chu-long/'.$ab.'.jpg')){
$img = 'chu-long/'.$ab.'.jpg';
$sv = false;
$cr = true;
}else{
$img = 'http://download.zat.su/hinh/'.$ab.'.jpg';
$fimg = file_get_contents($img);
$sv = true;
$cr = (preg_match('|404|', $fimg)?false:true);
}
if($cr){
$nd = '-<b style="color:red">Tạo thành công!</b><br/>
-<b style="color:red">Xem trước</b>:<br/>
<div style="text-align:center"><img src="'.$img.'" title="'.$a.'-'.$b.'" style="width:50%;height:auto;" /><br/>
[<a href="'.$img.'" title="'.$a.'-'.$b.'"/><b style="color:green">Tải ảnh</b></a>]
</div>';
if($sv) file_put_contents('chu-long/'.$ab.'.jpg', $fimg);
}else{
$nd = '-<b style="color:red">Tải ảnh không thành công!</b>';
}
}
$c = null;
for($i=65;$i<91;$i++){
$c .= '<option value="'.chr($i).'">'.chr($i).'</option>';
}


$title = 'Tạo chữ lồng ghép';
echo '<title>'.$title.'</title>
<div class="menu">Tạo chữ lồng</div>
'.($nd ? '<div class="main">'.$nd.'</div>':null).'
<div class="main">
<form method="post">*Chọn chữ cái muốn ghép:<br/>
<select name="a">'.$c.'</select>-<select name="b">'.$c.'</select> <input type="submit" value="Tạo ngay" class="submit" />
</form></div>';
?>
Xong
 

Facebook Comments

New posts New threads New resources

Back
Top