Closed Thread
Results 1 to 6 of 6




  

Thread: Google Image Leecher - Php Code

      
  1. #1
    I'm New! o0DarkEvil0o is on a distinguished road
    Join Date
    May 14, 2008
    Posts
    7
    Rep Power
    0
    Feedback Score
    0

    Default Google Image Leecher - Php Code

    Hi!
    This Code let you take a image search on google easily and user-friendly.
    You can pre-specify image properties: image name or caption, size and dimesion rank of image.

    Demo Here:
    PHP Code:
    Boy_US_Com/Code/google
    (replace _ symbol with .)

    Code Here:
    PHP Code:
    <?php
    session_start
    ();
    $_SESSION['count']=0;
    ?>
    <link href="../../client/style.css" rel="stylesheet" type="text/css">
    <center>
    <h2>Google Image Leecher</h2>
    Coder: <b>o0DarkEvil0o</b>
    <form action="./" method="POST">
    <table width="600">
        <tr>
            <td width="400" align="center">
                Search For
            </td>
            <td width="100" align="center">
                Max width             
            </td>
            <td width="100" align="center">
                Max height
            </td>
            <td width="100" align="center">
                Min width 
            </td>
            <td width="100" align="center">
                Min height
            </td>
        </tr>
        <tr>
            <td width="400">
                <input type="text" maxlength="40" size="40" name="res" value="<? echo $_POST['res'];?>">
            </td>
            <td width="100">
                <input type="text" maxlength="5" size="10" name="mxw" value="<? echo $_POST['mxw'];?>">
            </td>
            <td width="100">
                <input type="text" maxlength="5" size="10" name="mxh" value="<? echo $_POST['mxh'];?>">
            </td>
            <td width="100">
                <input type="text" maxlength="5" size="10" name="mnw" value="<? echo $_POST['mnw'];?>">
            </td>
            <td width="100">
                <input type="text" maxlength="5" size="10" name="mnh" value="<? echo $_POST['mnh'];?>">
            </td>
        </tr>
    </table>

    <input type="submit" value="Leech Now">
    </form>
    <hr width="600">
    <table width="900">
    <tr>
        <td width="700" align="center"><b>Image Link</b></td>
        <td width="100" align="left"><b>Dimesion</b></td>
        <td width="100" align="left"><b>Image Size</b></td>
    </tr>

    <?

    ini_set('max_execution_time',0);
    ini_set('time_limit',0);
    ini_set('memory_limit',-1);

    $linkarr=array
    (
        'http://images.google.com/images?q=',
        '&imgsz=medium|large|xlarge&ndsp=20&svnum=100&hl=en&start=',
        '&sa=N'
    );
    $searcharr=array
    (
        'dyn.Img(',
        ');dyn.updateStatus();//-->'
    );
     $s2=array('<span id=maxLimit>','</span>');

    function getResult($str,$hash)
    {
        $p=array();
        $p[0]=strpos($str,$hash[0]);
        $p[1]=strpos($str,$hash[1],$p[0]);
        return substr($str,$p[0],$p[1]-$p[0]);
    }

    function CutLink($Link, $Count)
    {
        if($Link=='')return 'Truy Cập trực tiếp';
        if(substr($Link,0,7)!='http://')$Link='http://'.$Link;
        $Link=str_replace('index.php','', $Link);
        $Len=strlen($Link);
        $Link1=$Link;
        if($Len>$Count)$Link1= substr($Link, 0, $Count-3).'...';
        return '<a href="'.$Link.'" target="_blank" '.$style.' onmouseover="Tip(\''.$Link.'\')">'.$Link1.'</a>';
    }

    function Dr_Row($link, $dimesion, $size)
    {
        $str ='<tr>';
        $str.='<td align="left"><a href="'.$link.'">'.CutLink($link, 100).'</a></td>';
        $str.='<td>'.$dimesion.'</td>';
        $str.='<td>'.$size.'</td>';
        $str.='</tr>';
        return $str;
    }

    $searchstring=$_POST['res'];
    iF($searchstring=='')die();
    ?>
    <div align="center" id="status">Leeching <b>[<?=$searchstring;?>]</b>...</div>
    <?
    $searchstring=str_replace(' ','+',$searchstring);
    for($k=0;$k<10000;$k++)
    {
    $link=$linkarr[0].$searchstring.$linkarr[1].($k*20).$linkarr[2];

    $content=file_get_contents($link);
    $maxres=strip_tags(getResult($content,$s2));
    $maxres=str_replace(',','',$maxres);
    $maxres=intval($maxres);
    if($maxres/20<$k) die('<script>document.getElementById(\'status\').innerHTML=\'Done, '.$_SESSION['count'].' images is detected!\';</script>');
    $arr=split('dyn.Img',getResult($content,$searcharr));
    $chuoi=array();
    $mxw=intval($_POST['mxw']);
    $mxh=intval($_POST['mxh']);

    if($mxw==0)$mxw=100000;
    if($mxh==0)$mxh=100000;

    $mnw=intval($_POST['mnw']);
    $mnh=intval($_POST['mnh']);

    foreach ($arr as $t)
    {
        $chandoi=split('","',$t);
        $size=split(' - ',$chandoi[9]);
        $dimension=split(' x ',$size[0]);
        $w=intval($dimension[0]);
        $h=intval($dimension[1]);
        $sizes=intval($size[1]);
        if( ($w <= $mxw) && ($w >= $mnw) && ($h <= $mxh) && ($h >=$mnh) && ($chandoi[3]!='') )
        {
            echo Dr_Row($chandoi[3], $size[0],$size[1]);
            $_SESSION['count']++;
        }
    }
    }
    ?>
    <script>
    document.getElementById('status').innerHTML='Done, <? echo $_SESSION['count'].' of '.$maxres; ?> images is detected!';
    </script>
    </table>

    </center>

  2. #2
    Butterflies Forever Sami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to beholdSami4u is a splendid one to behold Sami4u's Avatar
    Join Date
    March 8, 2008
    Location
    Lost on the Road
    Posts
    2,147
    Rep Power
    6
    Feedback Score
    0

    Default Re: Google Image Leecher - Php Code

    Hi,

    OK I'm new. What is this good for?

    :flower:
    Sami
    Check out the Current Celebrity News
    Bored??? Why not watch a Free Show

  3. #3
    The Force is Strong! iowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond reputeiowadawg has a reputation beyond repute
    Join Date
    October 18, 2006
    Posts
    6,872
    Rep Power
    11
    Feedback Score
    0

    Default Re: Google Image Leecher - Php Code

    Same here.

    Seems to be quicker and easier to just use google.

  4. #4
    Grand Masters zeus has a spectacular aura aboutzeus has a spectacular aura aboutzeus has a spectacular aura about zeus's Avatar
    Join Date
    April 24, 2008
    Location
    C:\WINDOWS\system32\viruses
    Posts
    641
    Rep Power
    5
    Feedback Score
    0

    Default Re: Google Image Leecher - Php Code

    Quote Originally Posted by Sami4u View Post
    Hi,

    OK I'm new. What is this good for?

    :flower:
    Sami
    Quote Originally Posted by iowadawg View Post
    Same here.

    Seems to be quicker and easier to just use google.

    Yeah must be used to search images faster by giving the dimensions...

  5. #5
    Jedi Master joseph will become famous soon enoughjoseph will become famous soon enoughjoseph will become famous soon enough joseph's Avatar
    Join Date
    January 28, 2007
    Location
    here and there
    Posts
    233
    Rep Power
    6
    Feedback Score
    0

    Default Re: Google Image Leecher - Php Code

    I was searching for something like this a couple of weeks back... It's useful, if you know what it's for.

    Hints: Porn, DownThemAll

  6. #6
    I'm New! o0DarkEvil0o is on a distinguished road
    Join Date
    May 14, 2008
    Posts
    7
    Rep Power
    0
    Feedback Score
    0

    Default Re: Google Image Leecher - Php Code

    Google Images is fast to show a page, but you can view all of result page for wanted image?


    with this page, you can pre-specify image properties. And to show all result. this code is faster than your search manual in google image.

    You can config this code to show image instead the link.

    Thank joseph. I coded this code for reason like you.

Closed Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. code for "do follow" search on google for blog comments
    By mikemason in forum Search Engines
    Replies: 11
    Last Post: Oct 28th, 2010, 1:46 am
  2. A new simple way to make a image slider- Javascript Code
    By o0DarkEvil0o in forum Programming
    Replies: 6
    Last Post: May 22nd, 2008, 3:36 pm
  3. Replies: 4
    Last Post: Nov 28th, 2007, 7:26 am
  4. Google Image Search
    By grim in forum Google
    Replies: 11
    Last Post: Mar 5th, 2007, 4:40 am

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
WebTalkForums
WebTalkForums
Recent Forum Threads