แจกรูปวอลเปเปอร์โดราเอมอน ขนาด 1024x768 pxl

เริ่มโดย ขัน, 13 กันยายน 2010, 09:56:34

หัวข้อก่อนหน้า - หัวข้อถัดไป

0 สมาชิก และ 1 ผู้มาเยือน กำลังดูหัวข้อนี้

ขัน

พอดีเขียนไว้ใช้ในโปรเจคต์ใหม่น่ะครับ เผื่อมีประโยชน์กับท่านอื่นบ้าง
คิดซะว่ามันคือดาบสองคมผุๆ จะเอาไปตีให้คมแล้วใช้ทำอะไร ก็แล้วแต่ความชอบของแต่ละคนครับ

ตัวอย่างที่ทำไว้ตามลิงก์นี้
http://www.xn--12cl1cba6b0a4byc6bzbd1lrefe.com/show.php

Source Code
<?php
/*
อ่านหน่อย - สคริปต์นี้เขียนลวกๆขึ้นใช้เฉพาะกิจในโปรเจคต์ส่วนตัว ไม่รับประกันว่าจะใช้ได้ตลอดในอนาคต ถ้า google เปลี่ยนรูปแบบ image search ก็จบเห่กันพอดี
ด้วยความที่แจกฟรี ไม่ขาย เลยไม่ขอรับประกันใดๆทั้งสิ้น ขอให้โชคดี อีเมล์, MSN : [email protected]
*/

$keyword="doraemon";
$img_w="1024";
$img_h="768";
$pstart="18";

//$target = getUrlContents('http://www.google.com/images?q='.$keyword.'&um=1&ie=UTF-8&source=og&sa=N&hl=th&tab=wi&biw=1366&bih=653');
$target getUrlContents('http://www.google.com/images?hl=en&&um=1&ie=UTF-8&source=og&sa=N&q='.$keyword.'&safe=on&tbs=isch:1,isz:ex,iszw:'.$img_w.',iszh:'.$img_h.'&sout=1&biw='.$img_w.'&bih='.$img_h.'&start='.$pstart);

///////////////////////

function getUrlContents($url$maximumRedirections null$currentRedirection 0)
{
    
$result false;
    
$contents = @file_get_contents($url);
    if (isset(
$contents) && is_string($contents))
    {
        
preg_match_all('/<[\s]*meta[\s]*http-equiv="?REFRESH"?' '[\s]*content="?[0-9]*;[\s]*URL[\s]*=[\s]*([^>"]*)"?' '[\s]*[\/]?[\s]*>/si'$contents$match);
        if (isset(
$match) && is_array($match) && count($match) == && count($match[1]) == 1)
        {
            if (!isset(
$maximumRedirections) || $currentRedirection $maximumRedirections)
            {
                return 
getUrlContents($match[1][0], $maximumRedirections, ++$currentRedirection);
            }
            
$result false;
        }
        else
        {
            
$result $contents;
        }
    }
    return 
$contents;
}

class 
ExtractTextBetweenTags
{
function extract($string,$ot,$ct)
{
$string trim($string);
$start intval(strpos($string,$ot) + strlen($ot));
$mytext substr($string,$start,intval(strpos($string,$ct) - $start));
return $mytext;
}
}

////////////////////////////////////////////

$extDetail = new ExtractTextBetweenTags();
$pData $extDetail->extract($target,'<div id=ImgCont>','</div><div id=ncm>');
$pData strip_tags($pData'<img>');

$pDatab $extDetail->extract($target,'<div id=ImgCont>','</div><div id=ncm>');
$pDatab strip_tags($pDatab'<table><tr><td>');
$splitterb explode('&times;',$pDatab);

$splitter explode('<img src=',$pData);

if(
$splitter[1]){
for($i=1$i<=18$i++) {

$splitterx explode('<td align=left valign=top width=23% >',$splitterb[$i]);
$spliturl explode('http://',$splitter[$i]);
$splitref explode(' width=',$spliturl[2]);
$splitref[0];

$splitterb explode(':http://',$splitter[$i]);

if($splitterb[0]){?>

<a href="http://<?=$splitref[0]?>" target="_blank"><img src='<?=$splitterb[0]?>' /></a>
<?
}
}
}
?>
[direct=http://www.coolstylecase.com/listt.php?model=GPL&page=1]Phone Case[/direct]  [direct=http://www.designbykhan.com]Design by Khan[/direct] [direct=http://www.m-thong.com]ห้องเช่าเมืองทอง[/direct] [direct=http://www.thaidokudami.com]พลูคาวโดกุดามิ[/direct]

pacapao

[direct=http://www.pacapao.com/]แหล่งรวมความรู้พิสดาร และ สาวสวยจากทั่วโลก[/direct]

[direct=http://www.facebook.com/pacapao]สุดยอด นักปั่นบันลือโลก..[/direct]

ศูนย์จำหน่าย ไตรจีวร และ สังฆภัณฑ์ จำหน่าย กระทะทองเหลือง ช้อนส้อมทองเหลือง แจกัน เชิงเทียน กระถางธูปทองเหลือง ไตรจีวร และ สังฆภัณฑ์ หลายชนิด ชุดผ้าไตร ชุดสรงน้ำ ผ้าอาบน้ำฝน ชุดทำบุญคุณภาพดี-จัดส่งทั่วไทย [direct=http://www.facebook.com/Sangkhapann]สังฆภัณฑ์[/direct]