All in one date class

All in one date class ingin menuliskan tanggal dalambentuk format apapun silahkan baca dan download file class nya. contoh penggunaannya seperti di bawah ini. sumbre dari www.phpclasses.org
<?

require_once "dateClass.php";

class cronoClass extends dateClass
{
private $_cronoStart = array();
private $_cronoStop = array();
private $_milliStart = array();
private $_milliStop = array();
private $_precision_milli = false;

public function set_precision_milli($precision_milli = false)
{
if (!is_bool($precision_milli))
throw new Exception("$precision_milli is not valid parameter",0);
$this -> _precision_milli = $precision_milli;
}
public function start($label = false)
{
if ($this -> _precision_milli)
{
$this -> _milliStart[$label] = $this -> get_Milliseconds();
$this -> _cronoStart[$label] = time();
return;
}
if ($label === false)
throw new Exception("You must define a crono label",0);
$this -> _cronoStart[$label] = $this -> get_Time(true);

}
public function stop($label = false)
{

if ($this -> _precision_milli)
{
$this -> _milliStop[$label] = $this -> get_Milliseconds();
$this -> _cronoStop[$label] = time();
return;
}

if ($label === false)
throw new Exception("You must define a crono label",0);
if (!isset($this -> _cronoStart[$label]))
throw new Exception("The label $label not exsist",0);
$this -> _cronoStop[$label] = $this -> get_Time(true);
}
public function get_diff_seconds($label = false)
{
$value1 = $this -> _cronoStop[$label] + $this -> _milliStop[$label];
$value2 = $this -> _cronoStart[$label] + $this -> _milliStart[$label];
return $value1 - $value2;
}
public function get_diff_media()
{
$keys = array_keys($this -> _milliStart);
for ($i = 0;$i< count($keys);$i++)
{
$tot += $this -> get_diff_seconds($keys[$i]);

}
return $tot / count($keys);
}
}


$cronometro = new cronoClass();
$cronometro -> set_precision_milli(true);
$i = 0;
$test = new dateClass();
for (;$i< 1000;$i++)
{
if ($i == 0) continue;
$cronometro -> start("test$i");

//sezione di test


try
{
$test -> set_Day("04");
//$test -> set_Month("12");
//$test -> set_Year("99");
//print_R($test -> toSource());

}
catch (Exception  $e)
{
$data = $e -> getTrace();

echo $e -> getMessage() . " - generated in function " . $data[0]["function"];

}


$cronometro -> stop("test$i");
}

echo "<hr>" . $cronometro -> get_diff_media();


?>
download all file

Class BrowserSearchBox

Class BrowserSearchBox

Description
Description | Vars (details) | Methods (details)
browserSearchBox Main class that used for generating the search plugin (OpenSearch description document) Located in /class.browserSearchBox.php (line 19)
Variable Summary
string $desc
string $formUrl
string $icon
string $languages
string $name
array $options
string $updateUrl
string $url
Method Summary
void __construct (sting 0)
void html_entities (string $str)
void init (sting 0)
void set_desc (string $desc)
void set_doc_developer (string $name)
void set_emailContact (string $mail)
void set_formUrl (string $url)
void set_icon (string $data, [string $type = "image/x-icon"])
void set_languages ([array $langlist = array()])
void set_name (string $name)
void set_opt (string $opt_id, string $opt_value)
void set_suggestionsUrl (string $url, [string $method = "GET"], [string $params = array()])
void set_url (string $url, [string $method = "GET"], [string $params = array()])
void set_updateUrl (string $url)
void set_xml ()
string xml_output ()
Variables
string $desc (line 35)
Contains site description
  • access: private
string $docDeveloper (line 43)
Contains the human-readable name or identifier of the creator or maintainer of the OpenSearch description document
  • access: private
string $emailContact (line 51)
Contains an email address at which the maintainer of the OpenSearch description document can be reached
  • access: private
string $formUrl (line 83)
Contains search page url "Firefox-specific feature"
  • access: private
string $icon (line 91)
Contains site favicon
  • access: private
string $languages (line 59)
Contains an array with languages that the search engine supports eg. en-us
  • access: private
string $name (line 27)
Contains site name
  • access: private
array $options (line 107)
Contains additional class options
  • access: private
string $suggestionsUrl (line 99)
Contains search suggestions url , note: this url must return data in json format
  • access: private
string $updateUrl (line 75)
Contains the xml file url describing a request to updtae the OpenSearch description document itself
  • access: private
string $url (line 67)
Contains search url
  • access: private
string $xml_output (line 115)
Contains search engine xml data
  • access: private
Methods
Constructor __construct (line 125)
Constructor for initializing the class with default values.
  • access: public
void __construct (sting 0)
  • sting 0: xml file url
html_entities (line 396)
encode all applicable characters to HTML entities
  • access: private
void html_entities (string $str)
  • string $str: to be encoded
init (line 137)
initializing the class with default values.
  • access: private
void init (sting 0)
  • sting 0: xml file url
set_desc (line 195)
used to set site description
  • access: public
void set_desc (string $desc)
  • string $desc: site description
set_doc_developer (line 225)
used to set the name or identifier of the creator or maintainer of the OpenSearch description document
  • access: public
void set_doc_developer (string $name)
  • string $name: site description
set_emailContact (line 210)
used to set email address at which the maintainer of the OpenSearch description document can be reached
  • access: public
void set_emailContact (string $mail)
  • string $mail: site description
set_formUrl (line 279)
used to set search page url
  • access: public
void set_formUrl (string $url)
  • string $url: search page url
set_updateUrl (line 279)
used to set the search plugin (OpenSearch description xml document) url to autoupdtae itself
  • access: public
void set_updateUrl (string $url)
  • string $url: search plugin (OpenSearch description xml document) url
set_icon (line 292)
used to set favicon image
  • access: public
void set_icon (string $data, [string $type = "image/x-icon"])
  • string $data: favicon image (favicon url / base64 icon data)
  • string $type: icon data type default(image/x-icon)
set_languages (line 240)
Used to set the languages that the search engine supports
  • access: public
void set_languages ([array $langlist = array()])
  • array $langlist: languages list
set_name (line 180)
used to set site name
  • access: public
void set_name (string $name)
  • string $name: sitename
set_opt (line 163)
used to set class options
  • access: public
void set_opt (string $opt_id, string $opt_value)
  • string $opt_id: option id
  • string $opt_value: options value
set_suggestionsUrl (line 309)
used to set search suggestions url
  • access: public
void set_suggestionsUrl (string $url, [string $method = "GET"], [string $params = array()])
  • string $url: search suggestions url
  • string $method: request method (GET/POST)
  • string $params: request params
set_url (line 263)
used to set search url
  • access: public
void set_url (string $url, [string $method = "GET"], [string $params = array()])
  • string $url: search url
  • string $method: request method (GET/POST)
  • string $params: request params
set_xml (line 324)
set search engine xml data
  • access: private
void set_xml ()
xml_output (line 407)
get search engine xml data
  • return: xml data
  • access: public
string xml_output ()

Documentation generated on Tue, 04 Aug 2009 00:11:08 +0300 by phpDocumentor 1.4.1

download all file

ASCII 2 Image

<?

//=============================//
//                             //
//   ascii2image class           //
//   ascii2image.class.php     //
//   by Razvan Stanga          //
//   razvan_stanga@yahoo.com   //
//   http://www.phprebel.org   //
//                             //
//       MADE IN ROMANIA       //
//                             //
//=============================//

class ascii2image {
var $nfo;
var $font;
var $file;
var $id;

function loadNFO ($id) {
$this->id = $id;
$path = "nfos/".$id.".nfo";
if ( file_exists ( $path ) ) {
$filesize            =    filesize ($path);
$filenum            =    fopen ($path, "r");
$cache                =    fread ($filenum, $filesize);
fclose ($filenum);
$this->nfo = $cache;
} else {
exit ("No nfo file found");
}
}

function loadFont ($font) {
if ( file_exists ( "fonts/".$font.".phpfont" ) ) {
$this->font = $font;
} else {
exit ("No font file found");
}
}

function doImage () {
$nfolines = explode ("\n", $this->nfo);
$font = imageloadfont ("fonts/".$this->font.".phpfont");

$width = 0;
$height = 0;
$fontwidth     = ImageFontWidth ($font);
$fontheight = ImageFontHeight ($font);

foreach ( $nfolines as $line ) {
if ( (strlen ($line)*$fontwidth) > $width ) {
$width = strlen ($line) * $fontwidth;
}
$height += $fontheight;
}

$width += $fontwidth*2;
$height += $fontheight*3;

$image = ImageCreate ($width, $height);

$white = ImageColorAllocate ($image, 255,255,255);
imagecolortransparent ($image, $white);

$black = ImageColorAllocate ($image, 0, 0, 0);

$i = $fontheight;
foreach ( $nfolines as $line ) {
ImageString ($image, $font , $fontwidth, $i, $line, $black);
$i += $fontheight;
}

$poweredby = "powered by ascii2image (c) www.phprebel.org";
$wid = ($width - ($fontwidth*strlen($poweredby) ) ) / 2;
ImageString ($image, $font , $wid, $i, $poweredby, $black);

ImageAlphaBlending($image, true);
if ( $this->file == TRUE ) {
ImagePNG ($image, "png/".$this->id.".png");
} else {
ImagePNG ($image);
}
ImageDestroy($image);
}

}

?>
contoh penggunaannya :
<?

//=============================//
//   ascii2image example       //
//   ascii2image.example.php   //
//   by Razvan Stanga          //
//   razvan_stanga@yahoo.com   //
//   http://www.phprebel.org   //
//       MADE IN ROMANIA       //
//=============================//

require ("ascii2image.class.php");

$ascii2image = new ascii2image ();

$ascii2image->loadNFO ("quantum");
$ascii2image->loadFont ("terminal");

// if this is true, it will create a file named quantum.png in png directory
$ascii2image->file = FALSE;

if ( $ascii2image->file == FALSE  ) {
Header( "Content-type: image/png");
} else {
echo "<img src=\"png/".$ascii2image->id.".png\">";
}

$ascii2image->doImage ();

?>
download selengkapnya disini

basic MySQL search engine

This is a basic MySQL search engine class you can use immediately to your site. All you have to do is fill up basic database configurations. Steps:
  1. Specify your host, username, password in array form
  2. Specify the tablename you want to use
  3. Specify primary key field of the table
  4. Specify the fieldnames of the table you want to look up
Example:
set_table($table);

$found->set_primarykey($key);

$found->set_keyword($keyword);

$found->set_fields($fields);

$result = $found->set_result();

print_r($result);
create SQL Table :
CREATE TABLE `bizmain` (
  `biz_id` mediumint(8) unsigned NOT NULL auto_increment,
  `biz_name` varchar(100) default NULL,
  `biz_address` varchar(255) default NULL,
  `biz_phone` varchar(100) default NULL,
  `biz_email` varchar(100) default NULL,
  `biz_url` varchar(100) default NULL,
  `biz_cat` varchar(100) default NULL,
  PRIMARY KEY  (`biz_id`)
) ;

INSERT INTO `bizmain` (`biz_id`, `biz_name`, `biz_address`, `biz_phone`, `biz_email`, `biz_url`, `biz_cat`) VALUES (1, 'LocalFilipino.com', 'Makati, Philippines', '(632) 848-0886', 'info@localfilipino.com', 'http://www.localfilipino.com', 'Advertising'),
(2, 'Liberty Realty', '2451 S. Buffalo Drive, Suite 145, Las Vegas, NV 89117', '(702) 248-8899', 'info@libertyrealty.com', 'http://www.libertyrealty.com', 'Real Estate, Realty'),
(3, 'FRS Philippine Freight', '5960 Spring Mtn Rd, 3-D<br> Las Vegas, NV 89146', '(702) 253-7555', 'info@frsphilippines.com', 'http://www.frsphilippines.com', 'Freight, Cargo');
Class
<?php
// +----------------------------------------------------------------------+
// | PHP version 4.4.2                                                    |
// +----------------------------------------------------------------------+
// | Copyright (c) 2006, padik.blogspot.com                               |
// | All rights reserved.                                                 |
// |                                                                      |
// | Redistribution and use in source and binary forms, with or           |
// | without modification, are permitted provided that the                |
// | following conditions are met:                                        |
// |                                                                      |
// | 1. Redistributions of source code must retain the above copyright    |
// |    notice, this list of conditions and the following disclaimer.     |
// | 2. Redistributions in binary form must reproduce the above copyright |
// |    notice, this list of conditions and the following disclaimer in   |
// |    the documentation and/or other materials provided with the        |
// |    distribution.                                                     |
// | 3. Neither the name of padik.blogspot.com nor the name of the        |
// |    contributor may be used to endorse or promote products derived    |
// |    from this software without specific prior written permission.     |
// |                                                                      |
// | THIS SOFTWARE IS PROVIDED BY CONTRIBUTOR ``AS IS'' AND ANY EXPRESS   |
// | OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED    |
// | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE   |
// | ARE DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTOR BE LIABLE FOR      |
// | ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR             |
// | CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT    |
// | OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;      |
// | OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF        |
// | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT            |
// | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF        |
// | THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF      |
// | SUCH DAMAGE.                                                         |
// |                                                                      |
// +----------------------------------------------------------------------+
// | Author: Rhoderick Espineda <padik@users.sourceforge.net>             |
// +----------------------------------------------------------------------+

class search_engine
{
function search_engine($mysql)
{
# set database connection
$this->host = $mysql[0];
$this->username = $mysql[1];
$this->password = $mysql[2];
$this->database = $mysql[3];
$this->link = mysql_connect($this->host,$this->username,$this->password) or die(mysql_error());
$this->db_selected = mysql_select_db($this->database,$this->link) or die(mysql_error());
$this->found = array();
}
function set_table($table)
{
# set table
$this->table = $table;
}
function set_keyword($keyword)
{
# set keywords
$this->keyword = explode(" ", $keyword);
}
function set_primarykey($key)
{
# set primary key
$this->key = $key;
}
function set_fields($field)
{
# set fieldnames to search
$this->field =$field;
}
function set_dump()
{
# var dump objects
echo '<pre>';
var_dump($this->found);
echo '</pre>';
}
function set_total()
{
# total results found
return sizeof($this->found);
}
function set_result()
{
# find occurence of inputted keywords
$key =  $this->key;
for ($n=0; $n<sizeof($this->field); $n++)
{
for($i =0; $i<sizeof($this->keyword); $i++)
{
$pattern = trim($this->keyword[$i]);
$sql = "SELECT * FROM ".$this->table." WHERE `".$this->field[$n]."` LIKE '%".$pattern."%'";
$result = mysql_query($sql);
while ($row = mysql_fetch_object($result) AND !empty($pattern))
{
$this->found[] = $row->$key;
}
}
}
$this->found = array_unique($this->found);
return $this->found;
}
}

?>
Preview OUTPUT search engine basic MySQL search engine download All File

Database servers down alarm

Sometimes your ISP's MySQL or other DB database servers may go down. This can be critical for your business, and you surely want to know about it ASAP. This module's task is doing what you want: it checks out alive or 'dead' state of all registered DBMS servers (different kinds of DBMS supported). If some server seems to get down, you (or your web-admin) receive email notification, and your ISP support team receives another one (message for ISP can contain your client info like agreement number or Client ID, that support team usualy wants to know). You schedule a call of your checking script with appropriate time interval (say 10 minutes), and since this moment your DB servers are monitored by you, not only by your ISP techicians. When DB server return to operational mode, you receive respective "I'm back" notification. Supported Databases are: * MySQL * mSQL * PostgreSQL * Oracle (Oracle oci extension must be loaded) * Microsoft SQL (MS SQL extension must be loaded) * DB2 * Any other DB that can be connected by your PHP function The only used and tested by me is MySQL. The rest databases can be tested by anyone, and if something wrong please let me know. One more thing: may be you have an engine for sending SMS from your site and would like to get instant SMS messages about DB server problems. Then you can "register" your function that will use SMS engine and send alert messages to your mobile device. Installation on the site * Place php module as_dbserver_check.php into your site's folder, * Edit checkdb.php or create your own script, filling it with all your parameters for the job. * Tune your CRON or other scheduling module to run this checking script periodically. Simple code example
require_once('as_dbserver_check.php');

$checker = new CDbChecker('My tiny site','','My client ID is 7777, agreement 10101/2009');
$checker->SetEmails('myownmail@acme.com','support@my-isp.com');

$checker->AddServer(DBTYPE_MYSQL,'localhost','username','password');
$checker->CheckDbState();
Using the class CDbChecker All checking jobs are performed in CheckDbState() method, so ALL needed parameters must be set before calling it. Here is a full method list with descriptions.
CDbChecker($title='', $homefolder='', $isptext='')
- class constructor. $title can contain any short description of your site - it's inserted in email message that will be sent to you or defined admins in your company. $homefolder - folder on the local server, that will hold "flag" files. These flags created to avoid repetitive "spamming" when server is down for a long time (for example: your checking runs every 5 minutes, and DB server down 3 hour. To avoid sending "alarm" every 5 minutes, small "flag" file is created. When DB server goes online, this file will be deleted, and you'll receive a message "server is UP"). No need to say, this folder must be writable from PHP scripts. Default value - current folder, './' $isptext is additional text body for your ISP support. It can contain your client id or anything else you want. This text will be prepended to the email message. SetEmails($adminemail,$ispemail='', $emailcset='') registers two email addresses: you company's web-admin (may be you) and your ISP support address. When some DB server down detected, the alarm message is sent to both addresses (if both passed). And when server gets up, the message is sent only to you or your admin ($adminemail address).
AddServer($dbtype,$address,$login='',$passwd='',$connfunc=false,$downtime='')
- method registers one database server to check out. $dbtype is one of database types from DBTYPE_MYSQL,DBTYPE_MSQL,DBTYPE_POSTGRESQL,DBTYPE_ORACLE,DBTYPE_MSSQL,DBTYPE_DB2, or it can be any other code (non-listed DB type). $address is a server address. In MySQL case it can be in "host:port" form. For PostgreSQL it can be a full connect string like "host=localhost port=5432 dbname=mary" (new pg_connect format)- in that case parameters $login and $password not used. Otherwise connection string will be constructed from passed parameters. So if your server has non-standard port, you should pass full connect string $address. $connfunc is optional "make connection" function's name, that is used for "undefined" data types. Besides it will be used (if passed) for MS SQL databases, when mssql extension not loaded. The same is correct for Oracle databases. $connfunc should return non-empty value if connection successfully established. Any empty returned value (0, false) is treated as "connect fail". $downtime can be used if your ISP turns down databases for service tasks every day at the same time. For example since 02 to 04 AM your DB can be down due to ISP service jobs. So checking database state at this interval must be paused. In that case pass non-empty string in $downtime in format "hh:mm-hh:mm", holding beginning and ending time (hh-hours, mm-minutes). In our case it should be "02:00-04:00" string. Of course, this pause can be defined in cron schedule string. But in that case it will pause the whole job, instead of "per-connection" apply. SetSMSEngine($smsfunc='') registers your function that can prepare and send SMS messages. In fact, it can be any function that will be called if some server state changes detected (DB server goes down or up). This function must receive a text to send in first parameter. Please note: CDbChecker knows nothing about SMS formats, supported character sets or maximal message length, it just calls function whose name was registered ! CheckDbState() finally this is called to do the job. All registered DB connections are checked, if some state has changed since last check, respective message will be composed. "Server is Down alarms" and all "Server is UP" are gathered in two independent text block, so two independent messages can be called: one about servers that get down, and another one if some servers get up. If defined, "SMS sending" function will be called with each of these messages as parameter. Method returns true if all registered DB servers are OK, and false if something is down. Distributed under BSD License Example
<?PHP
/**
* Checking DB server state, using as_dbserver_check.php example
*/
require_once('as_dbserver_check.php');

$srv = new CDbChecker(
 'Testing local DBMS server',
 './',
 "Our hosting agreement is 7777/2009, customer ID is 7070\nPlease check our MySQL databse state ASAP !\n");

$srv->SetEmails('admin@mycompany.ru','support@my-provider.net');
$srv->AddServer(DBTYPE_MYSQL,'hostname','myusername','mypassword');
// $srv->AddServer(DBTYPE_POSTGRESQL,'host=pgsql_host port=3444 name=myname','','04:00-05:00');
// postgreSQL is down for maintenance from 04 to 05 AM
$srv->CheckDbState();

?>
Download File : as_dbserver_check-2009-06-23.zip

Bar chart drawing

If You need adding some business graphics presentation to Your WEB site, you use diagrams (charts). The question is what kind of diagrams you need and what engine is optimal for you. When I came to this situation, I decided to write small PHP engine that doesn't use graphics library (GD) at all, because all I needed was a bar charts. Generated HTML code does not contain any java or javascript code, so it must be compatible with almost any version of browser. This engine implemented in OOP manner, as PHP class. It tested and works well under PHP 4.3.x. Here is an instruction of how to embed "as-diagrams" engine into your intranet or internet site.

Installing as-diagrams on your site

There is no much revolutionary in installing process:
  1. Download distributive zip file and unzip it into temporary folder. If you will use diagram engine from more than one page, place as-diagrams.php file into one of folders listed in your PHP.ini "include_path" variable. Otherwise, just place it in the folder with your main script.
  2. Move or copy img folder contents into your common pictures folder (You'll set relative path to this folder in the $imgpath variable)
  3. Open script file as-diagrams.php in text editor and adjust some lines :
    var $bt_total = 'Totals'; // localize here or include into separate file
    var $imgpath = '/img/'; // place all 'diagram' images in this "folder"
    $bt_total = ... - localize 'Totals' title text if needed. $imgpath = ... - set your 'relative' path to the pictures folder.
  4. for better look find stylesheet section in as-diagrams.php and adjust it to meet your web-site common design
That's it, if Your site already supports PHP 4.x, script is ready to go. Now we'll make it breathe.

Using CAsBarDiagram class

You can draw bar charts for pre-calculated data arrays, or pass SQL queries to CAsBarDiagram object variable.
  1. Do not forget to include engine module into your script file : require_once('as-diagrams.php');
  2. Define object var of CAsBarDiagram class, and set some non-default values if needed:
         $graph = new CAsBarDiagram;
         $graph->bwidth = 15; // one bar width in pixels
         $graph->showdigits = 0; // hide "digit presentation" part under bars (turned ON by default)
         $graph->bt_total = 'Some totals'; // title for totals column on the right side
         $graph->precision = 0;  // how much digits after decimal point
         $graph->showtotals = 0;  // hide totals column, (turned ON by default)
  3. Make one- or two-dimensional arrays for "legends" - one for X axis ($legend_x), and one for Y axis (Y is a number of bars in on X-th "group") One-dimensional legend array holds just a "keys" for every column, it's used as a key while gathering data and as a legend title on the var chart (in case You use one-dim legends). If You prepare two-dimensional array, the first element ($legend_x[$row][0]) in a row will be treated as a key value, and the second one, $legend_x[$row][1] - as a legend title. In that case there is no need in additional "key" array legendx_id. Note that 'keys' only needed if Uou'll collect data from a SQL database, where your entities have "digital" unique ID's (primary keys in SQL tables) and "text" representation.
         $legend_x = array('Yanuary','February','March','April','May','June');
         $legend_y = array(array(1,'pens'),array(2,'pensils'),array(3,'staplers'),array(4,'paper'));
    
  4. Now You can choose from 2 methods: 1) gather data for drawing by Yourself, placing them into $data[x][y], and pass $data to the bar drawing method of CAsBarDiagram class:
           $data = array( array(200,300,120), array(450,500,100), array(650,200,300),
                          array(380,200,90), array(750,340,200));
           $graph->DiagramBar($legend_x, $legend_y, $data, 1, 'Sales results');
        
    2) call GatherData method, passing a SQL-query to it, so all data can be gathered for You (don't forget to connect MySQL base before this !):
           $graph->InitData($legend_x, $legend_y); // reset internal data array if needed
           $graph->GatherData($SQLqry, $legend_x, $legend_y);
           // ... GatherData can be called more than once
           $graph->DiagramBar($legend_x, $legend_y, 0, $data_title);
        
    Please note, in the second case You pass scalar value (0) to DiagramBar() method instead of data array, so engine can choose internal data array, assembled by GatherData calls.

CAsBarDiagram methods and variables

InitData($legend_x, $legend_y) - this method clens up inetrnal data array from all the data. It is nesessary if You use on CAsBarDiagram object var for multiple bar drawing, before collecting data for second (, third, etc.) graphs. Internal data dimension becomes equal to count($legend_x), count(legend_y). GatherData($sqltext, $legend_x, $legend_y [,$position_y]) - executes passed SQL query on currently open MySQL connection and fills internal array with result data. You can fill all array rows if Your query returns three fields : the first one is a "key" for X-axis, second one - for Y axis, and third field is a value we are going to render. Quary sample (MySQL)
       SELECT MONTH(sale_date) AS mnt, product, SUM(sales_val) FROM sales
       WHERE YEAR(sale_date)=2005 GROUP BY mnt,product
  
If You want to fill just one row in data array, You just design and pass two-field SQL query, and an optional 4-th parameter, $position_y, defining Y-position of data column beeing filled. DiagramBar($legend_x, $legend_y, [$data|0, [$data_title]]) - the main method, it draws bar chart. If 3-rd paraveter is omitted or scalar value, internal data array will be rendered. In case of array passed, CAsBarDiagram uses it instead of internal data even if You've called GatherData() before. $data - two-dimensional data array. $data[x][y] - value for bar 'Y' in Y-th section in the bar chart. $showdigits - turns On/Off rendering of "digit" part under bars (the table with number presentation of rendered data array) $ShowPercents - by assigning some non-empty string to this array var You turn on "percents" drawing: additional rows will be rendered in the "digit" area under the bars. This row[s] will contain 'percent' values for two previous rows - $data[n-1]/$data[n] * 100. This feature was introduced, when my boss asked me to show fact/plan in percent, knowing that the one row was a 'fact' and the next - planned values. How to use it: Suppose, there is a data row with 'fact' values, that has a corresponding title 'Year 2005' in the $legend_y array. The next row is a 'plan' data, having title 'Plan 2005' in the $legend_y. So, when we need to draw "Fact/plan * 100%" values right after the 'plan' row, we just put this code before calling DiagramBar() method:
$graph->ShowPercents['Plan 2005'] = 'Percents';
If this var set to one short letter or digit (say, '1' or '*'), the title for this row will be computed from two last rows in legend_y : 'Legend_y_for_fact/Legend_y_for_plan, %'. If You set a longer string, it will be used as a row title. Sample:
$graph->ShowPercents[Plan 2004'] = 'Plan 2004 reaching, percents';
     $graph->ShowPercents[Plan 2005'] = 'Plan 2005 reaching, percents';
     // two "percent" rows will be shown
     $graph->DiagramBar($legend_x, $legend_y, 0, $data_title);
If you set $graph->ShowPercents array element to non-empty value, "digit" part will be rendered regardless of $graph->showdigits value. (as if $showdigits was 1) $drawempty_x, $drawempty_y - this var? defines "to draw OR NOT to draw" for empty columns/columns in the barchart. They are equal 1 by default, i.e. all columns and rows (even with all zeroes) will be drawn. You have to set it before calling DiagramBar(). The method HideEmptyX($Hide=1) can be used to hide empty columns, and HideEmptyX() to hide empty rows in the digit part. HideEmptyXY($val=true) can be called to set both (x and y) values.
     $grarh->drawempty_x = 0;
     $graph->HideEmptyX(); // both operators has an equal result.
The next three variables used for converting Your legend titles to URL links.
  • legendx_url - this is a class variable, that can be set if You want legend titles to become URL links (anchors). Just set the desired "URL" value to this var:
         $grarh = new CAsBarDiagram;
         $graph->legendx_url = 'detailedinfo.php?info_id={ID}';
    After that all legend titles will become a <A HREF...>'s to Your URL. Macro "{ID}" will be substituted with ID value or with N-th element value of legendx_id array, it it's set.
  • legendx_onClick - this var holds "onClick" event value, so if You want to run some JavaScript instead of opening new URL, set Your event here. For example, to open popup window with some detailed data, You may fill the variable like this:
    $graph->legendx_onClick = "window.open('details.php?id={ID}', '_blank','height=300,width=400');";
    
  • legendx_id - {ID} values array that will be used for creating "legend anchors". If it's not set, legend X title texts will substitute {ID} values in hrefs and "onClick" event definitions.
Here's working example.
require_once('as-diagrams.php');
//... include other needed libs

$data_title = 'as-diagrams demo barchart'; // title for the diagram

$data = array();
$data[] = array(900, 1300,1600);
$data[] = array(1200,1800,2500);
$data[] = array(1400,2000,2800);
$data[] = array(1900,2900,3900);
$data[] = array(2500,3500,4500);

$legend_x = array('Yan','Feb','March','April','May');
$legend_y = array('pens','pensils','staplers');

$graph = new CAsBarDiagram;
$graph->bwidth = 10; // set one bar width, pixels
$graph->bt_total = 'Summary'; // 'totals' column title, if other than 'Totals'
// $graph->showtotals = 0;  // uncomment it if You don't need 'totals' column
$graph->precision = 0;  // decimal precision
// call drawing function
$graph->DiagramBar($legend_x, $legend_y, $data, $data_title);
As a result of calling this script You will see something like this: 43a4062532f63acf8d62e4848d20e729 medium 150x150 Bar chart drawing Here are some comments about using engine.
  • Data can contain negative values - in that case the second (negative) part of a data will be drawn.
  • You can set the bar width by setting $bwidth variable before calling DiagramBar();
  • If data array contains too much lines, leading to draw very wide page, one bar width will be automatically adjusted ($bwidth variable). The maximum graph width is 1024 pixels (for "standard" monitor resolution 1024 x 768). If You want to disable this behavior, just find in as-diagrams.php the code line :
      "var $autoshrink = 1024;"
     
    and comment it. Or, yes, You can change the maximum screen width here.
  • As You might notice, Y axis is alwais divided into four parts, and each part has a height of 60 pixels (so, maximum full Y axis height is 240 px). Image file "bar-bg240.png" is used as a background for the main graphics area. If You want to change a background, just modify this file. If you want to change this "base" height, You will have to draw a new backgound image, name it bar-bgNNNN.png (image height 1/4 of desired "full" height), and pass the new height into engine: to do this, just add a line somewhere in your code, before calling DiagramBar(): $graf_height = NNNN;where NNNN - your height for Y axis.Remember, if Your data contains positive and negative values, diagrams may be up to two times higher, because of drawing two parts.
  • If You want to change bar colors or their order, just edit code in as-diagrams.php or substitute original files bar-*.png. But when You'll be painting new bars please keep in mind - they will be stretched/shrinked vertically and horizontally on final graphs.
  • By default bars filled by stretched images bar-xxxxx.png. If You want "tiled" images, just set non-empty value for variable $btilemode before calling DiagramBar(): $btilemode=1; In that case You will want to substitute pre-defined pictures with some "tile" looking ones.
  • If You plan working with small or non-integer values, decimal precision will count, in that case You can adjust a number of decimal digits in $precision variable - just set it to desired value before calling DiagramBar(): $precision = 4;Default precision is 2.
Download all files : as-diagrams-2008-05-05.zip
By admin on 19 April, 2010 | Tip & trik Grafik, database | A comment?
Tags: , ,

Teknik Encrypt dan decrypt untuk menyimpan data tersembunyi di dalam gambar bitmap

teknik Encrypt dan Decript Data dalam Bitmap Image Trik berikut adalah bagaimana teknik Encrypt dan Decript data yang disimpan dalam gambar Bitmap (bmp). misalkan anda ingin menyimpan data tapi tidak ingin diketahui orang lain, nah ada bisa menyimpan data tersebut di dalam gambar bitmap atau seperti yang sering kita lihat gambar BMP. biasanya penyimpanan data dalam bitmap atau gambar lainnya atau file-file lainya dimanfaatkan programmer untuk menyebarkan virus-virus. tetapi di dalam trik ini adalah bagaimana mengunci atau meng-Encrypt data dalam fie BMP. Dalam penggunaannya tidak ada batasan type file yang akan di-Encrypt. data akan disimpan dengan baik di dalam file Bitmap 24-biat atau 32-bit. dan hasilnya akan berupa file bitmap seperti asilnya dan tidak terlihat perubahan gambar sedikitpun. pada contoh berikut adalah bagaimana meng-Encrypt file JPG ke dalam file BMP. Sebagai ilustrasi perhatikan gambar di bawah ini.
Encrypt gambar Horse

Gambar Horse Orisinil

+ Gambar untuk menyipan data Encrypt = Horse In Dog
selain itu juga dilengkapi dengan Decrypt yaitu untuk mengembalikan file yang sedang di encrypt yang disembunyikan di dalam file bitmap. inilah script Class Bitmap Encrypt silahkan download class serta contohnya
By admin on 1 April, 2010 | Sekuriti, Tip & trik Grafik | A comment?

Operator Aritmatika

Operator Aritmatika

di dalam setiap pemrograman tentu saja memerlukan operator aritmatika, karena semua dasar sintak semuanya berdasarkan runtutan logika matematika. operator ini sangat mudah diterjemahkan bagi anda yang pernah masuk ke sekolah dasar, seperti pertambahan, pengurangan, perkalian, pembagian. nah penggunaan dari operator-operator matemetika di di atas tentu saja tidak jauh berbeda. berikut inilah daftar cara contoh cara penulisan operator matemetika di dalah pmrograman PHP.
Contoh Nama Hasil
-$a Negasi lawan dari $a.
$a + $b Pertambahan tambahkan nilai $a dan nilai $b.
$a - $b Pengurangan kurangkan nilai $a dengan nilai$b.
$a * $b Perkalian kalikan nilai $a dan nilai $b.
$a / $b Pembagian bagikan nilai $a dengan nilai $b.
$a % $b Modulus sisa hasil pembagian nilai $a oleh nilai $b.
contoh aplikasi
<?php
$a=5;
$b=6;
$c= $a + $b;
echo $c;
?>
maka hasilnya akan muncul 11
By admin on 27 March, 2010 | Operators pada PHP | A comment?
Tags:

Tips Menyedot Backlinks

Sedot Backlinks

Tips trik menyedot backlink sangat dibutuhkan untuk blog atau website yang baru dibuat, baik untuk meningkatkan PageRank ataupun lainnya. dengan sedikit trik, Backlink bisa kita dapatkan dengan mudah, salah satunya adalah dengan memanfaatkan website yang pasti memberikan backlink. yaitu website yang memberikan backlink secara gratis hanya jika kita memberikan link ke website tersebut. trik kali ini adalah membuat link ke situs yang pasti memberikan backlink dengan mencantumkan nama domain kita sebagai alamat balik, sebagai contoh website alexa.com, hanya dengan membuat link ke alexa.com dengan contoh link http://www.alexa.com/siteinfo/domainkita/ maka jika link tersebut dibuka maka backlink pasti akan tercipta dengan sendirinya. domainkita tersebut diisi dengan nama domain yang akan di link balik.

Daftar Situs yang memberikan Backlink

berikut beberapa website yang mamberikan backlink secara gratis. pada contoh berikut menggunakan domain http://tips-triks-php.com
Home Page
URL
onthesamehost.com http://www.onthesamehost.com/tips-triks-php.com
sitedossier.com http://www.sitedossier.com/site/tips-triks-php.com
r-domain.net http://www.r-domain.net/domain/tips-triks-php.com
gealgeol.com http://www.gealgeol.com/php/pr/tips-triks-php.com
bdomain.org http://bdomain.org/tips-triks-php.com.html
www.sitonomy.com http://www.sitonomy.com/?url=http://tips-triks-php.com
www.webtrafficagents.com http://www.webtrafficagents.com/Whois/tips-triks-php.com
www.statsmogul.com http://www.statsmogul.com/www.tips-triks-php.com
www.websiteshadow.com http://websiteshadow.com/tips-triks-php.com
www.revoew.com http://www.revoew.com/site.php?s=tips-triks-php.com
www.urloutlook.com http://www.urloutlook.com/siteinfo/www.tips-triks-php.com
www.spider.com.au http://www.spider.com.au/search?q=www.tips-triks-php.com&c=au&pc=&lg=en&oe=utf-8
online.htmlvalidator.com http://online.htmlvalidator.com/php/onlinevallite.php?url=http://tips-triks-php.com
onlinewebcheck.com http://www.onlinewebcheck.com/check.php?url=http://tips-triks-php.com
peekstats.com http://www.peekstats.com/www.tips-triks-php.com
valuatemysite.com http://www.valuatemysite.com/tips-triks-php.com
statinternet.com http://www.statinternet.com/domain/tips-triks-php.com
www.cynthiasays.com http://www.cynthiasays.com/mynewtester/cynthia.exe?url1=http://tips-triks-php.com
aboutdomain.org http://aboutdomain.org/info/tips-triks-php.com
aboutus.org http://aboutus.org/tips-triks-php.com
alexa.com http://alexa.com/siteinfo/tips-triks-php.com
backlinkcheck.com http://backlinkcheck.com/popular.pl?url1=tips-triks-php.com
browsershots.org http://browsershots.org/http://tips-triks-php.com
builtwith.com http://builtwith.com/?tips-triks-php.com
checkdomain.com http://checkdomain.com/cgi-bin/checkdomain.pl?domain=tips-triks-php.com
cnm.edu http://cnm.edu/extlink.php?link=http://tips-triks-php.com
cqcounter.com http://cqcounter.com/rbl_check/?query=tips-triks-php.com
cqcounter.com http://cqcounter.com/siteinfo/?query=tips-triks-php.com
cqcounter.com http://cqcounter.com/traceroute/?query=tips-triks-php.com
cubestat.com http://cubestat.com/www.tips-triks-php.com
dnsexit.com http://dnsexit.com/source/domaindetail.jsp?domainname=tips-triks-php.com
domainlocators.net http://domainlocators.net//newdnr/whois/search.jsp?whois.domain=tips-triks-php.com
domains.whois.com http://domains.whois.com/domain.php?action=whois&query=tips-triks-php.com
esitestats.com http://esitestats.com/tips-triks-php.com
fasterwhois.com http://fasterwhois.com/cgi-bin/fast_whois?domain=tips-triks-php.com
feedest.com http://feedest.com/feedHost.cfm/host/tips-triks-php.com
find-ip-address.org http://find-ip-address.org/whois/mrwhois_details.php?ddomain=tips-triks-php.com&server=whois.opensrs.net
goldencalfnyc.com http://goldencalfnyc.com/index.php?keyword=http://tips-triks-php.com/&search=Search
grader.com http://grader.com/site.php?URL=tips-triks-php.com
home.nps.gov http://home.nps.gov/applications/redirect/?sUrl=http://tips-triks-php.com
hosts-file.net http://hosts-file.net/?s=tips-triks-php.com
ip-adress.com http://ip-adress.com/whois/tips-triks-php.com
iwebtool.com http://iwebtool.com/pagerank_checker?domain=tips-triks-php.com
markosweb.com http://markosweb.com/www/tips-triks-php.com/
milonic.com http://milonic.com/whois.php?domain=tips-triks-php.com&ref=&WebServer=
namedroppers.com http://namedroppers.com/who/tips-triks-php.com
name-services.info http://name-services.info/cgi-bin/whois_search.cgi?domain=tips-triks-php.com&sequence=889q&realsequence=30df0c6d0099914be7f15d3d548839c44266a36f&page=blank
ncsacw.samhsa.gov http://ncsacw.samhsa.gov/offsite.asp?url=http://tips-triks-php.com
netregister.biz http://netregister.biz/cgi-bin/w.cgi?d=check_dominio.undefined&lng=UK&dominio=tips-triks-php.com
netvaluer.com http://netvaluer.com/show.asp?site=tips-triks-php.com
networksolutions.com http://networksolutions.com/whois-search/tips-triks-php.com
network-tools.com http://network-tools.com/default.asp?prog=whois&host=tips-triks-php.com
page2rss.com http://page2rss.com/page?url=tips-triks-php.com/
pageheat.com http://pageheat.com/heat/tips-triks-php.com
protect-x.com http://protect-x.com/info/tips-triks-php.com
quantcast.com http://quantcast.com/tips-triks-php.com
quantcast.com http://quantcast.com/profile/no-data-for-site?domain=tips-triks-php.com
quarkbase.com http://quarkbase.com/show/tips-triks-php.com
quickwhois.co.uk http://quickwhois.co.uk/whois.php?domain=tips-triks-php.com&button1=Check
ratite.com http://ratite.com//whois/whois.cgi?domain=tips-triks-php.com
jigsaw.w3.org http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.tips-triks-php.com&profile=css3&usermedium=all&warning=2&lang=en
ratite.com http://ratite.com/whois/whois.cgi#tips-triks-php.com
registrar.verisign-grs.com http://registrar.verisign-grs.com/cgi-bin/whois?whois_nic=tips-triks-php.com&x=60&y=12&type=domain
reports.internic.net http://reports.internic.net/cgi/whois?whois_nic=tips-triks-php.com&type=domain
robtex.com http://robtex.com/dns/tips-triks-php.com.html
seoarena.org http://seoarena.org/sh/tips-triks-php.com/
shootybangbang.com http://shootybangbang.com/whois.cgi?q=tips-triks-php.com&button=submit
siteadvisor.cn http://siteadvisor.cn/sites/tips-triks-php.com/summary/
siteadvisor.cn http://siteadvisor.cn/sites/tips-triks-php.com
siteanalytics.compete.com http://siteanalytics.compete.com/tips-triks-php.com
sitedossier.com http://sitedossier.com/site/tips-triks-php.com
sitetiki.com http://sitetiki.com/tips-triks-php.com
spacereg.com http://spacereg.com/a.rpl?m=whois&domain=tips-triks-php.com
statbrain.com http://statbrain.com/tips-triks-php.com
statsaholic.com http://statsaholic.com/tips-triks-php.com
tgsc.ru http://tgsc.ru/redirect/http://www.tips-triks-php.com.html
toolbar.netcraft.com http://toolbar.netcraft.com/site_report?url=http://tips-triks-php.com
htmlhelp.com http://htmlhelp.com/cgi-bin/csscheck.cgi?url=http%3A%2F%2Ftips-triks-php.com
tweetmeme.com http://tweetmeme.com/domain/tips-triks-php.com
uk1.co.uk http://uk1.co.uk/cgi-bin/cart/cart.cgi?typeofsearch=rawwhois&domain=tips-triks-php.com&server=whois.nic.uk
uptime.netcraft.com http://uptime.netcraft.com/up/graph?site=tips-triks-php.com
urladex.com http://urladex.com/index.py?page=url&url=tips-triks-php.com
urltrends.com http://urltrends.com/viewtrend.php?url=tips-triks-php.com
websiteaccountant.com http://websiteaccountant.com/tips-triks-php.com
websiteoutlook.com http://websiteoutlook.com/tips-triks-php.com
webhosting.info http://webhosting.info/webhosts/reports/total_domains/tips-triks-php.com
wfl.fhwa.dot.gov http://wfl.fhwa.dot.gov/other/exit.htm?link=http://tips-triks-php.com
whatismyip.com.np http://whatismyip.com.np/whois.php?query=tips-triks-php.com
who.godaddy.com http://who.godaddy.com/whoischeck.aspx?Domain=tips-triks-php.com
who.is http://who.is/whois/tips-triks-php.com/
whois.domainpeople.com http://whois.domainpeople.com/whois.cgi?domain=tips-triks-php.com
whois.domaintools.com http://whois.domaintools.com/tips-triks-php.com
whois.net http://whois.net/whois/tips-triks-php.com
whoisbeta.com http://whoisbeta.com/index.php?query=tips-triks-php.com
whoisbucket.com http://whoisbucket.com/view/tips-triks-php.com
whoisd.com http://whoisd.com/search.php?code=2119&domain=tips-triks-php.com&GO=GO
whoisn.com http://whoisn.com/lookup.php?domain=tips-triks-php.com&button1=Check
whois-search.com http://whois-search.com/whois/tips-triks-php.com
whoisx.co.uk http://whoisx.co.uk/tips-triks-php.com
whoisya.com http://whoisya.com/tips-triks-php.com
www2.scc.rutgers.edu http://www2.scc.rutgers.edu/ead/showfile.php?filename=http://tips-triks-php.com
xmarks.com http://xmarks.com/site/tips-triks-php.com/
zoneedit.com http://zoneedit.com/whois.html?zone=tips-triks-php.com
snapnames.com https://snapnames.com/?aff=321&dom=tips-triks-php.com
who.securepaynet.net https://who.securepaynet.net/whoischeck.aspx?ci=14582&domain=tips-triks-php.com&prog_id=enet_world
cssportal.com http://www.cssportal.com/css-validator/validate.htm?url=http://tips-triks-php.com
abell.as.arizona.edu http://abell.as.arizona.edu/~hill/cgi-bin/webglimpse.cgi/home/hill/public_html/4x4?query=%22%3E%3Ca+href%3Dhttp%3A%2F%2Ftips-triks-php.com%3ELink%3C%2Fa%3E&errors=0&age=&maxfiles=50&maxlines=30

Script PHP

contoh script yang digunakan untuk sedot backlinks adalah sebagai berikut : <? $target[]=array("http://aboutdomain.org/info/<url>","aboutdomain.org"); $target[]=array("http://aboutus.org/<url>","aboutus.org"); $target[]=array("http://alexa.com/siteinfo/<url>","alexa.com"); $target[]=array("http://backlinkcheck.com/popular.pl?url1=<url>","backlinkcheck.com"); $target[]=array("http://browsershots.org/http://<url>","browsershots.org"); $target[]=array("http://builtwith.com/?<url>","builtwith.com"); $target[]=array("http://checkdomain.com/cgi-bin/checkdomain.pl?domain=<url>","checkdomain.com"); $target[]=array("http://cnm.edu/extlink.php?link=http://<url>","cnm.edu"); $target[]=array("http://cqcounter.com/rbl_check/?query=<url>","cqcounter.com"); $target[]=array("http://cqcounter.com/siteinfo/?query=<url>","cqcounter.com"); $target[]=array("http://cqcounter.com/traceroute/?query=<url>","cqcounter.com"); $target[]=array("http://cubestat.com/www.<url>","cubestat.com"); $target[]=array("http://dnsexit.com/source/domaindetail.jsp?domainname=<url>","dnsexit.com"); $target[]=array("http://domainlocators.net//newdnr/whois/search.jsp?whois.domain=<url>","domainlocators.net"); $target[]=array("http://domains.whois.com/domain.php?action=whois&query=<url>","domains.whois.com"); $target[]=array("http://esitestats.com/<url>","esitestats.com"); $target[]=array("http://fasterwhois.com/cgi-bin/fast_whois?domain=<url>","fasterwhois.com"); $target[]=array("http://feedest.com/feedHost.cfm/host/<url>","feedest.com"); $target[]=array("http://find-ip-address.org/whois/mrwhois_details.php?ddomain=<url>&server=whois.opensrs.net","find-ip-address.org"); $target[]=array("http://goldencalfnyc.com/index.php?keyword=http://<url>/&search=Search","goldencalfnyc.com"); $target[]=array("http://grader.com/site.php?URL=<url>","grader.com"); $target[]=array("http://home.nps.gov/applications/redirect/?sUrl=http://<url>","home.nps.gov"); $target[]=array("http://hosts-file.net/?s=<url>","hosts-file.net"); $target[]=array("http://ip-adress.com/whois/<url>","ip-adress.com"); $target[]=array("http://iwebtool.com/pagerank_checker?domain=<url>","iwebtool.com"); $target[]=array("http://markosweb.com/www/<url>/","markosweb.com"); $target[]=array("http://milonic.com/whois.php?domain=<url>&ref=&WebServer=","milonic.com"); $target[]=array("http://namedroppers.com/who/<url>","namedroppers.com"); $target[]=array("http://name-services.info/cgi-bin/whois_search.cgi?domain=<url>&sequence=889q&realsequence=30df0c6d0099914be7f15d3d548839c44266a36f&page=blank","name-services.info"); $target[]=array("http://ncsacw.samhsa.gov/offsite.asp?url=http://<url>","ncsacw.samhsa.gov"); $target[]=array("http://netregister.biz/cgi-bin/w.cgi?d=check_dominio.undefined&lng=UK&dominio=<url>","netregister.biz"); $target[]=array("http://netvaluer.com/show.asp?site=<url>","netvaluer.com"); $target[]=array("http://networksolutions.com/whois-search/<url>","networksolutions.com"); $target[]=array("http://network-tools.com/default.asp?prog=whois&host=<url>","network-tools.com"); $target[]=array("http://page2rss.com/page?url=<url>/","page2rss.com"); $target[]=array("http://pageheat.com/heat/<url>","pageheat.com"); $target[]=array("http://protect-x.com/info/<url>","protect-x.com"); $target[]=array("http://quantcast.com/<url>","quantcast.com"); $target[]=array("http://quantcast.com/profile/no-data-for-site?domain=<url>","quantcast.com"); $target[]=array("http://quarkbase.com/show/<url>","quarkbase.com"); $target[]=array("http://quickwhois.co.uk/whois.php?domain=<url>&button1=Check","quickwhois.co.uk"); $target[]=array("http://ratite.com//whois/whois.cgi?domain=<url>","ratite.com"); $target[]=array("http://bisnis-hosting.com/","Bisnis Hosting"); $target[]=array("http://ratite.com/whois/whois.cgi#<url>","ratite.com"); $target[]=array("http://registrar.verisign-grs.com/cgi-bin/whois?whois_nic=<url>&x=60&y=12&type=domain","registrar.verisign-grs.com"); $target[]=array("http://reports.internic.net/cgi/whois?whois_nic=<url>&type=domain","reports.internic.net"); $target[]=array("http://robtex.com/dns/<url>.html","robtex.com"); $target[]=array("http://seoarena.org/sh/<url>/","seoarena.org"); $target[]=array("http://shootybangbang.com/whois.cgi?q=<url>&button=submit","shootybangbang.com"); $target[]=array("http://siteadvisor.cn/sites/<url>/summary/","siteadvisor.cn"); $target[]=array("http://siteadvisor.cn/sites/<url>","siteadvisor.cn"); $target[]=array("http://siteanalytics.compete.com/<url>","siteanalytics.compete.com"); $target[]=array("http://sitedossier.com/site/<url>","sitedossier.com"); $target[]=array("http://sitetiki.com/<url>","sitetiki.com"); $target[]=array("http://spacereg.com/a.rpl?m=whois&domain=<url>","spacereg.com"); $target[]=array("http://statbrain.com/<url>","statbrain.com"); $target[]=array("http://statsaholic.com/<url>","statsaholic.com"); $target[]=array("http://tgsc.ru/redirect/http://www.<url>.html","tgsc.ru"); $target[]=array("http://toolbar.netcraft.com/site_report?url=http://<url>","toolbar.netcraft.com"); $target[]=array("http://lutviavandi.com/bisnis-hosting.html","Bisnis Hosting"); $target[]=array("http://tweetmeme.com/domain/<url>","tweetmeme.com"); $target[]=array("http://uk1.co.uk/cgi-bin/cart/cart.cgi?typeofsearch=rawwhois&domain=<url>&server=whois.nic.uk","uk1.co.uk"); $target[]=array("http://uptime.netcraft.com/up/graph?site=<url>","uptime.netcraft.com"); $target[]=array("http://urladex.com/index.py?page=url&url=<url>","urladex.com"); $target[]=array("http://urltrends.com/viewtrend.php?url=<url>","urltrends.com"); $target[]=array("http://websiteaccountant.com/<url>","websiteaccountant.com"); $target[]=array("http://websiteoutlook.com/<url>","websiteoutlook.com"); $target[]=array("http://webhosting.info/webhosts/reports/total_domains/<url>","webhosting.info"); $target[]=array("http://wfl.fhwa.dot.gov/other/exit.htm?link=http://<url>","wfl.fhwa.dot.gov"); $target[]=array("http://whatismyip.com.np/whois.php?query=<url>","whatismyip.com.np"); $target[]=array("http://who.godaddy.com/whoischeck.aspx?Domain=<url>","who.godaddy.com"); $target[]=array("http://who.is/whois/<url>/","who.is"); $target[]=array("http://whois.domainpeople.com/whois.cgi?domain=<url>","whois.domainpeople.com"); $target[]=array("http://whois.domaintools.com/<url>","whois.domaintools.com"); $target[]=array("http://whois.net/whois/<url>","whois.net"); $target[]=array("http://whoisbeta.com/index.php?query=<url>","whoisbeta.com"); $target[]=array("http://whoisbucket.com/view/<url>","whoisbucket.com"); $target[]=array("http://whoisd.com/search.php?code=2119&domain=<url>&GO=GO","whoisd.com"); $target[]=array("http://whoisn.com/lookup.php?domain=<url>&button1=Check","whoisn.com"); $target[]=array("http://whois-search.com/whois/<url>","whois-search.com"); $target[]=array("http://whoisx.co.uk/<url>","whoisx.co.uk"); $target[]=array("http://whoisya.com/<url>","whoisya.com"); $target[]=array("http://www2.scc.rutgers.edu/ead/showfile.php?filename=http://<url>","www2.scc.rutgers.edu"); $target[]=array("http://xmarks.com/site/<url>/","xmarks.com"); $target[]=array("http://zoneedit.com/whois.html?zone=<url>","zoneedit.com"); $target[]=array("https://snapnames.com/?aff=321&dom=<url>","snapnames.com"); $target[]=array("https://who.securepaynet.net/whoischeck.aspx?ci=14582&domain=<url>&prog_id=enet_world","who.securepaynet.net"); $target[]=array("http://bellevuefootball.com/external/magpierss/scripts/magpie_debug.php?url=<feed>","bellevuefootball.com"); $target[]=array("http://blog.verture.net/incs/magpie/scripts/magpie_debug.php?url=<feed>","blog.verture.net"); $target[]=array("http://byrtp.com/magpie/scripts/magpie_debug.php?url=<feed>","byrtp.com"); $target[]=array("http://code.urban.cens.ucla.edu/rss/magpie/scripts/magpie_debug.php?url=<feed>","code.urban.cens.ucla.edu"); $target[]=array("http://diskes.siakkab.go.id/external/magpierss/scripts/magpie_debug.php?url=<feed>","diskes.siakkab.go.id"); $target[]=array("http://eiuvoip.net/includes/rss/scripts/magpie_debug.php?url=<feed>","eiuvoip.net"); $target[]=array("http://envs.ucsc.edu/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","envs.ucsc.edu"); $target[]=array("http://humanities.ucsc.edu/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","humanities.ucsc.edu"); $target[]=array("http://it.sju.edu/scripts/magpierss/scripts/magpie_debug.php?url=<feed>","it.sju.edu"); $target[]=array("http://jewishstudies.ucsc.edu/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","jewishstudies.ucsc.edu"); $target[]=array("http://language.ucsc.edu/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","language.ucsc.edu"); $target[]=array("http://literature.ucsc.edu/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","literature.ucsc.edu"); $target[]=array("http://microsoft-dynamics-ax.com/magpierss/scripts/magpie_debug.php?url=<feed>","microsoft-dynamics-ax.com"); $target[]=array("http://netlink.indiaproud.com/rss/scripts/magpie_debug.php?url=<feed>","netlink.indiaproud.com"); $target[]=array("http://paris-hilton-pictures-videos.com/magpierss/scripts/magpie_debug.php?url=<feed>","paris-hilton-pictures-videos.com"); $target[]=array("http://porter.appstate.edu/energy/magpierss/scripts/magpie_debug.php?url=<feed>","porter.appstate.edu"); $target[]=array("http://psychology.ucsc.edu/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","psychology.ucsc.edu"); $target[]=array("http://qss.ucsc.edu/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","qss.ucsc.edu"); $target[]=array("http://sccan.scripps.edu/scripts/feed2js/magpie_debug.php?url=<feed>","sccan.scripps.edu"); $target[]=array("http://the-paris-hilton-videos.com/magpierss/scripts/magpie_debug.php?url=<feed>","the-paris-hilton-videos.com"); $target[]=array("http://ukbmd.org.uk/magpierss/scripts/magpie_debug.php?url=<feed>","ukbmd.org.uk"); $target[]=array("http://urban.cens.ucla.edu/rss/magpie/scripts/magpie_debug.php?url=<feed>","urban.cens.ucla.edu"); $target[]=array("http://westedenvis.org/wp-content/plugins/kiwi/includes/magpierss/scripts/magpie_debug.php?url=<feed>","westedenvis.org"); $target[]=array("http://www.andersoneight.com/external/magpierss/scripts/magpie_debug.php?url=<feed>","andersoneight.com"); $target[]=array("http://www.apricothosting.com/mag/scripts/magpie_debug.php?url=<feed>","apricothosting.com"); $target[]=array("http://www.armm.gov.ph/external/magpierss/scripts/magpie_debug.php?url=<feed>","armm.gov.ph"); $target[]=array("http://www.axelsteininger.com/rss/scripts/magpie_debug.php?url=<feed>","axelsteininger.com"); $target[]=array("http://www.barrystickets.com/rssfeed/scripts/magpie_debug.php?url=<feed>","barrystickets.com"); $target[]=array("http://www.dailyluxe.com/magpierss/scripts/magpie_debug.php?url=<feed>","dailyluxe.com"); $target[]=array("http://www.ens-lyon.fr/Bibli/oai/rss/scripts/magpie_debug.php?url=<feed>","ens-lyon.fr"); $target[]=array("http://www.erp-and-crm.com/magpierss/scripts/magpie_debug.php?url=<feed>","erp-and-crm.com"); $target[]=array("http://www.euroconstruct.org/magpierss/scripts/magpie_debug.php?url=<feed>","euroconstruct.org"); $target[]=array("http://www.firstinservicegroup.com/tours/external/magpierss/scripts/magpie_debug.php?url=<feed>","firstinservicegroup.com"); $target[]=array("http://www.giohnleegreen.com/external/magpierss/scripts/magpie_debug.php?url=<feed>","giohnleegreen.com"); $target[]=array("http://www.hcs.harvard.edu/currier/rss/scripts/magpie_debug.php?url=<feed>","hcs.harvard.edu"); $target[]=array("http://www.hizbuttahrir.org/zmodules/RSS/pnincludes/scripts/magpie_debug.php?url=<feed>","hizbuttahrir.org"); $target[]=array("http://www.imknight.co.uk/exptest/external/magpierss/scripts/magpie_debug.php?url=<feed>","imknight.co.uk"); $target[]=array("http://www.infoworld.com/industrystandard/geeklog2/public_html/rss/scripts/magpie_debug.php?url=<feed>","infoworld.com"); $target[]=array("http://www.pa.msu.edu/people/frenchj/feed2js/magpie_debug.php?url=<feed>","pa.msu.edu"); $target[]=array("http://www.programatium.com/supergames/magpierss/scripts/magpie_debug.php?url=<feed>","programatium.com"); $target[]=array("http://www.scripps.edu/scripts/feed2js/magpie_debug.php?url=<feed>","scripps.edu"); $target[]=array("http://www.skyinsight.com/wiki/extensions/magpierss/scripts/magpie_debug.php?url=<feed>","skyinsight.com"); $target[]=array("http://www.somejustice.com/wp-content/themes/kiwi/includes/magpierss/scripts/magpie_debug.php?url=<feed>","somejustice.com"); $target[]=array("http://www.tabernaculopopayan.org/external/magpierss/scripts/magpie_debug.php?url=<feed>","tabernaculopopayan.org"); $target[]=array("http://www.usc.edu/schools/college/clas/news/magpierss/scripts/magpie_debug.php?url=<feed>","usc.edu"); $target[]=array("http://www.uvm.edu/~waw/archives/magpie/scripts/magpie_debug.php?url=<feed>","uvm.edu"); $target[]=array("http://www2.ucsc.edu/literature/include/external/magpierss/scripts/magpie_debug.php?url=<feed>","www2.ucsc.edu"); $target[]=array("http://www.sport.online-n3ws.com/includes/magpierss/scripts/magpie_debug.php?url=<feed>","sport.online-n3ws.com"); $target[]=array("http://quila.dk/magpierss/scripts/magpie_debug.php?url=<feed>","quila.dk"); $target[]=array("http://www.salcher.de/external/magpierss/scripts/magpie_debug.php?url=<feed>","salcher.de"); $target[]=array("http://www.preservegraydon.org/inc/magpierss/scripts/magpie_debug.php?url=<feed>","preservegraydon.org"); $target[]=array("http://www.employment-finder.com/magpierss/scripts/magpie_debug.php?url=<feed>","employment-finder.com"); $target[]=array("http://tinbums.com/magpierss/scripts/magpie_debug.php?url=<feed>","tinbums.com"); $target[]=array("http://www.qparlortattoosupplierstechniquesdesign.co.cc/magpierss/scripts/magpie_debug.php?url=<feed>","qparlortattoosupplierstechniquesdesign.co.cc"); $target[]=array("http://online-offerz.com/magpierss/scripts/magpie_debug.php?url=<feed>","online-offerz.com"); $target[]=array("http://easymaasser.com/israhelp/magpierss/scripts/magpie_debug.php?url=<feed>","easymaasser.com"); $target[]=array("http://easymaasser.com/israhelp_old/magpierss/scripts/magpie_debug.php?url=<feed>","easymaasser.com"); $target[]=array("http://www.photoshopinc.com/magpierss/scripts/magpie_debug.php?url=<feed>","photoshopinc.com"); $target[]=array("http://www.netchemistry.co.uk/worldsconnect/community/magpierss/scripts/magpie_debug.php?url=<feed>","netchemistry.co.uk"); $target[]=array("http://sam.focusindia.com/magpierss/scripts/magpie_debug.php?url=<feed>","sam.focusindia.com"); $target[]=array("http://www.mainweb.com.ar/clases/magpierss/scripts/magpie_debug.php?url=<feed>","mainweb.com.ar"); $target[]=array("http://www.aonerecruitment.co.uk/includes/magpierss/scripts/magpie_debug.php?url=<feed>","aonerecruitment.co.uk"); $target[]=array("http://www.presentemagicomdp.com.ar/clases/magpierss/scripts/magpie_debug.php?url=<feed>","presentemagicomdp.com.ar"); $target[]=array("http://www.venturejoint.in/magpierss/scripts/magpie_debug.php?url=<feed>","venturejoint.in"); $target[]=array("http://www.dealswamp.com/racing/magpierss/scripts/magpie_debug.php?url=<feed>","dealswamp.com"); $target[]=array("http://www.vsobi.si/alpha/shared_scripts/magpierss/scripts/magpie_debug.php?url=<feed>","vsobi.si"); $target[]=array("http://www.wz4v.com/magpierss/scripts/magpie_debug.php?url=<feed>","wz4v.com"); $target[]=array("http://www.cosdlakobiet.pl/magpierss/scripts/magpie_debug.php?url=<feed>","cosdlakobiet.pl"); $target[]=array("http://www.viva-lasvegas.info/magpierss/scripts/magpie_debug.php?url=<feed>","viva-lasvegas.info"); $target[]=array("http://www.nicegifts.co.uk/shared/php/classes/rss/magpierss/scripts/magpie_debug.php?url=<feed>","nicegifts.co.uk"); $target[]=array("http://www.easysatelliteradio.com/magpierss/scripts/magpie_debug.php?url=<feed>","easysatelliteradio.com"); $target[]=array("http://www.proarredo.it/magpierss/scripts/magpie_debug.php?url=<feed>","proarredo.it"); $target[]=array("http://www.dealswamp.com/baby/magpierss/scripts/magpie_debug.php?url=<feed>","dealswamp.com"); $target[]=array("http://www.landmark-project.com/feed2js/magpierss/scripts/magpie_debug.php?url=<feed>","landmark-project.com"); $target[]=array("http://pages.cs.wisc.edu/~roundy/mrss/scripts/magpie_debug.php?url=<feed>","pages.cs.wisc.edu"); $target[]=array("http://www.sarthak.net/rss/magpie_debug.php?url=<feed>","sarthak.net"); $target[]=array("http://www.waheguroo.com/w/magpierss/scripts/magpie_debug.php?url=<feed>","waheguroo.com"); $target[]=array("http://www.bizarrebids.com/feed/magpie_debug.php?url=<feed>","bizarrebids.com"); $target[]=array("http://www.dur.ac.uk/scripts/rss/magpie/scripts/magpie_simple.php?url=<feed>","dur.ac.uk"); $target[]=array("http://ginkosoft.com/extensions/3rdparty/RSS/magpierss/scripts/magpie_simple.php?url=<feed>","ginkosoft.com"); $target[]=array("http://pluto.business.ecu.edu/Fall2007/1/external/magpierss/scripts/magpie_simple.php?url=<feed>","pluto.business.ecu.edu"); $target[]=array("http://www.pgj.pb.gov.br/site/Internet/Conteudo/Header/cg/corregedoria_rss/scripts/magpie_simple.php?url=<feed>","pgj.pb.gov.br"); $target[]=array("http://www.nophishing.org/magpierss-0.71.1/scripts/magpie_simple.php?url=<feed>","nophishing.org"); $target[]=array("http://www.misterqr.com/magpierss/scripts/magpie_simple.php?url=<feed>","misterqr.com"); $target[]=array("http://home.deds.nl/~rsx/tim/nzb/class/mp/scripts/magpie_simple.php?url=<feed>","home.deds.nl"); $target[]=array("http://www.ukdivers.net/support/feed/scripts/magpie_debug.php?url=<feed>","ukdivers.net"); $target[]=array("http://www.scripps.edu/scripts1/feed2js/magpie_simple.php?url=<feed>","scripps.edu"); $target[]=array("http://andhracafe.com/rss/rssfeeds/magpie_simple.php?url=<feed>","andhracafe.com"); $target[]=array("http://www.feedforall.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","feedforall.com"); $target[]=array("http://www.myrsscreator.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","myrsscreator.com"); $target[]=array("http://www.zsj4.cn/rss2html.php?XMLFILE=<feed>&TEMPLATE=template.html&MAXITEMS=10","zsj4.cn"); $target[]=array("http://www.labouruniondigest.org.uk/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","labouruniondigest.org.uk"); $target[]=array("http://www.developer-resource.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","developer-resource.com"); $target[]=array("http://www.passarella.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","passarella.com"); $target[]=array("http://www.therangerstation.com/galleries/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","therangerstation.com"); $target[]=array("http://www.petdirectory.com.au/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","petdirectory.com.au"); $target[]=array("http://www.hollyburnsailingclub.ca/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","hollyburnsailingclub.ca"); $target[]=array("http://www.lukeburrage.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","lukeburrage.com"); $target[]=array("http://www.prfaa.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","prfaa.com"); $target[]=array("http://marketingtools.avaya.com/knowledgebase/ipoffice/general/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","marketingtools.avaya.com"); $target[]=array("http://www.katherinehowell.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","katherinehowell.com"); $target[]=array("http://www.vistamedicalresearch.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","vistamedicalresearch.com"); $target[]=array("http://www.twistedbrands.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","twistedbrands.com"); $target[]=array("http://www.prioryward.org.uk/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","prioryward.org.uk"); $target[]=array("http://www.00110000.com/Temporalfusion/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","00110000.com"); $target[]=array("http://www.developer-resource.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","developer-resource.com"); $target[]=array("http://www.petdirectory.com.au/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","petdirectory.com.au"); $target[]=array("http://www.labouruniondigest.org.uk/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","labouruniondigest.org.uk"); $target[]=array("http://www.thephdj.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","thephdj.com"); $target[]=array("http://www.twistedbrands.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","twistedbrands.com"); $target[]=array("http://www.allwebapps.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","allwebapps.com"); $target[]=array("http://ezwebediting.com/capitalk6/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","ezwebediting.com"); $target[]=array("http://www.assetsure.com/rss/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","assetsure.com"); $target[]=array("http://www.gurudevan.info/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","gurudevan.info"); $target[]=array("http://www.cbcsdwc.org/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","cbcsdwc.org"); $target[]=array("http://scripts.rss2html.com/public/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","scripts.rss2html.com"); $target[]=array("http://www.maccapodcast.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","maccapodcast.com"); $target[]=array("http://www.sw.fh-koeln.de/sozial_raum_management/rss/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","sw.fh-koeln.de"); $target[]=array("http://www.radiomiamigo.eu/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","radiomiamigo.eu"); $target[]=array("http://www.visualsteps.nl/feeds/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","visualsteps.nl"); $target[]=array("http://www.balanced-plus.nl/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","balanced-plus.nl"); $target[]=array("http://www.euromediarts.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","euromediarts.com"); $target[]=array("http://www.cotobelos.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","cotobelos.com"); $target[]=array("http://www.bergvliet.nl/nieuws/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","bergvliet.nl"); $target[]=array("http://www.hujinkai.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","hujinkai.com"); $target[]=array("http://www.bbcevergem-sleidinge.be/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","bbcevergem-sleidinge.be"); $target[]=array("http://www.prfaa.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","prfaa.com"); $target[]=array("http://zafa.be/RSS/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","zafa.be"); $target[]=array("http://artneedlecapandgown.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","artneedlecapandgown.com"); $target[]=array("http://www.topsalesexperts.com/rss/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","topsalesexperts.com"); $target[]=array("http://abell.as.arizona.edu/~hill/cgi-bin/webglimpse.cgi/home/hill/public_html/4x4?query=%22%3E%3Ca+href%3Dhttp%3A%2F%2F<url>%3ELink%3C%2Fa%3E&errors=0&age=&maxfiles=50&maxlines=30","abell.as.arizona.edu"); $target[]=array("http://www.wusik.com/w/rss-php/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","wusik.com"); $target[]=array("http://www.automatedbuildings.com/rss/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","automatedbuildings.com"); $target[]=array("http://syncros.com/rssfeedscript/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","syncros.com"); $target[]=array("http://travel-write.travelnotes.org/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","travel-write.travelnotes.org"); $target[]=array("http://www.craigrousseau.com/shared/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","craigrousseau.com"); $target[]=array("http://www.friendlycomics.com/shared/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","friendlycomics.com"); $target[]=array("http://www.eslhelpdesk.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","eslhelpdesk.com"); $target[]=array("http://www.scadindustries.com/rss/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","scadindustries.com"); $target[]=array("http://www.smls-hawaii.org/News/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","smls-hawaii.org"); $target[]=array("http://www.travelsmartnewsletter.com/rss/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","travelsmartnewsletter.com"); $target[]=array("http://www.bestofewan.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","bestofewan.com"); $target[]=array("http://www.csif.org/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","csif.org"); $target[]=array("http://www.priio.com/site/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","priio.com"); $target[]=array("http://www.notepage.net/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","notepage.net"); $target[]=array("http://www.dignursery.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","dignursery.com"); $target[]=array("http://www.matrixenergetics.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","matrixenergetics.com"); $target[]=array("http://www.realclearpolitics.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","realclearpolitics.com"); $target[]=array("http://artneedlecapandgown.com/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","artneedlecapandgown.com"); $target[]=array("http://www.sw.fh-koeln.de/sozial_raum_management/rss/rss2html.php?XMLFILE=<feed>&TEMPLATE=http://bisnis200rb.com/template.html","sw.fh-koeln.de"); $sb_feed='tips-triks-php.com';//$_SERVER['HTTP_HOST'].'/feed'; $sb_url='tips-triks-php.com';//$_SERVER['HTTP_HOST']; ?> <table width="378" border="1" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="80" height="24" align="center" valign="middle"><div align="center"><strong>Home Page</strong></div></td> <td width="293" align="center" valign="middle"><strong>URL</strong></td> </tr> <? for($i=0;$i<count($target);$i++){ $showurl = str_replace('<feed>',$sb_feed,$target[$i][0]); $showurl = str_replace('<url>',$sb_url,$showurl); if(!eregi('<feed>',$target[$i][0])){ ?> <tr> <td height="27" align="center" valign="middle"><?=$target[$i][1]?></td> <td align="center" valign="middle"><?='<a href='.$showurl.'>'.$showurl.'</a>'?></td> </tr> <? }}?> </table> .semoga bermanfaat yah... atau bisa download scriptnya
By admin on 15 March, 2010 | tips trik SEO | A comment?

Membuat Web Page ScreenShot dengan PHP

webpage screenshot

webpage screen shot biasanya digunakan untuk melihat halaman suatu webpage dalam ukuran kecil. Jika ingin membuat website yang menyediakan layanan webpage screenshot bisa menggunakan sintak imagegrabscreen() atau imagegrabwindow(). sebagai contoh adalah sebagai berikut :
contoh imagegrabscreen() berikut disimpan dalam eksensi .png
<?php $im = imagegrabscreen(); imagepng($im, "myscreenshot.png"); ?>
contoh di bawah ini adalah contoh imagegrabwindow()
yang disimpan dalam file .png <?php $browser = new COM("InternetExplorer.Application"); $handle = $browser->HWND; $browser->Visible = true; $im = imagegrabwindow($handle); $browser->Quit(); imagepng($im, "iesnap.png"); ?> atau menggunakan script di bawah ini
<?php $browser = new COM("InternetExplorer.Application"); $handle = $browser->HWND; $browser->Visible = true; $browser->Navigate("http://www.libgd.org"); /* Still working? */ while ($browser->Busy) { com_message_pump(4000); } $im = imagegrabwindow($handle, 0); $browser->Quit(); imagepng($im, "iesnap.png"); ?>
namun setelah saya cari-cari berkelana ada class khusus yang dibuat untuk screenshot.
class tersebut adalah sebagai berikut :
<?php defined( 'WINDOW' ) or define( 'WINDOW', 10001 ); defined( 'SCREEN' ) or define( 'SCREEN', 10002 ); defined( 'SWAP' ) or define( 'SWAP', 10003 ); set_time_limit( 60 ); /** * screenshot * * @package Screenshot * @author Danltn * @copyright 2008 * @license GPL * @version 0.1 Beta * @access public */ class screenshot { public $image = null; // This is  the image public $details = array(); // Any details we collect protected $IE = null; // IE instance protected $url = false; // URL we're using private static $instance; // Class Instance protected $visible = false; // IE visibility status protected $fullscreen = false; // IE fullscreen status protected $height = false; // IE height protected $width = false; // IE width protected $silent = false; // IE silent status protected $status_bar = false; // IE status bar status protected $address_bar = false; // IE address bar status protected $top = false; // IE position from top protected $left = false; // IE position from left protected $resizable = false; // IE resizable status protected $theatermode = false; // IE theater mode status protected $toolbar = false; // IE toolbar status public $pump = false; // Should we pump after every action /** * screenshot::__construct() * * @param bool $pump * @param bool $height * @param bool $width * @return class $this */ public function __construct( $pump = false, $height = false, $width = false ) { $this->check_compatibility() or die( $this->error('PHP too old or functions missing!') ); register_shutdown_function( array(&$this, "__destruct") ); $this->start_ie(); $this->size( $height, $width ); if ( $pump ) { $this->pump = true; } return $this; } /** * screenshot::navigate() * * @param string $url * @return bool true */ public function navigate( $url = 'about:blank' ) { $url = ( $url ) ? $url : 'about:blank'; $this->IE->Navigate( ($url) ? $url : 'about:blank' ); $this->url = $url; $time = time(); while ( $this->IE->ReadyState != '4' and $time + 2 > time() ) { $this->pump(); } if ( $this->pump ) { $this->pump( 1000 ); } return true; } /** * screenshot::silent() * * @param bool $silent * @return object $this */ public function silent( $silent = true ) { if ( $silent == SWAP ) { $this->IE->Silent = !$this->silent; $this->silent = !$this->silent; } else { $this->IE->Silent = ( bool )$silent; $this->silent = ( bool )$silent; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::get_handle() * * @return handle */ public function get_handle() { return $this->IE->HWND; } /** * screenshot::check_compatibility() * * @return bool true/false */ private function check_compatibility() { if ( version_compare(phpversion(), "5.2.2", "<") ) { $this->error( 'PHP Version too old, 5.2.2 required.', 1 ); return false; } if ( !function_exists('imagegrabwindow') or !function_exists('com_message_pump') or !function_exists('imagepng') or !class_exists('COM') ) { $this->error( 'Required PHP functions missing.', 1 ); return false; } return true; } /** * screenshot::start_ie() * * @return object $this */ public function start_ie() { $this->IE = new COM( "InternetExplorer.Application" ) or die( $this->error('Could not start Internet Explorer instance.') ); if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::quit() * * @return object $this */ public function quit() { if ( is_object($this->IE) ) { $this->IE->Quit(); } $this->IE = null; unset( $this->IE ); return $this; } /** * screenshot::details() * * @return object $this->details */ public function details() { $this->details['path'] = $this->IE->Path; $this->details['fullname'] = $this->IE->FullName; $this->details['name'] = $this->IE->Name; $this->details['offline'] = $this->IE->Offline; return $this->details; } /** * screenshot::set_visible() * * @param bool $visible * @return object $this */ public function set_visible( $visible = true ) { if ( $visible == SWAP ) { $this->IE->Visible = !$this->visible; $this->visible = !$this->visible; } else { $this->IE->Visible = ( bool )$visible; $this->visible = ( bool )$visible; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::set_resizable() * * @param bool $resizable * @return object $this */ public function set_resizable( $resizable = true ) { if ( $resizable == SWAP ) { $this->IE->Resizable = !$this->resizable; $this->resizable = !$this->resizable; } else { $this->IE->Resizable = ( bool )$resizable; $this->resizable = ( bool )$resizable; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::status_bar() * * @param bool $status_bar * @return object $this */ public function status_bar( $status_bar = false ) { if ( $status_bar == SWAP ) { $this->IE->StatusBar = !$this->status_bar; $this->status_bar = !$this->status_bar; } else { $this->IE->StatusBar = ( bool )$status_bar; $this->status_bar = ( bool )$status_bar; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::address_bar() * * @param bool $address_bar * @return object $this */ public function address_bar( $address_bar = false ) { if ( $address_bar == SWAP ) { $this->IE->AddressBar = !$this->address_bar; $this->address_bar = !$this->address_bar; } else { $this->IE->AddressBar = ( bool )$address_bar; $this->address_bar = ( bool )$address_bar; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::set_fullscreen() * * @param bool $fullscreen * @return object $this */ public function set_fullscreen( $fullscreen = true ) { if ( $fullscreen == SWAP ) { $this->IE->Fullscreen = !$this->fullscreen; $this->fullscreen = !$this->fullscreen; } else { $this->IE->Fullscreen = ( bool )$fullscreen; $this->fullscreen = ( bool )$fullscreen; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::set_toolbar() * * @param bool $toolbar * @return object $this */ public function set_toolbar( $toolbar = true ) { if ( $toolbar == SWAP ) { $this->IE->ToolBar = !$this->toolbar; $this->toolbar = !$this->toolbar; } else { $this->IE->ToolBar = ( bool )$toolbar; $this->toolbar = ( bool )$toolbar; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::go() * * @param string $where * @param integer $times * @return object $this */ public function go( $where = '', $times = 1 ) { $where = ucfirst( strtolower(($where)) ); if ( !in_array($where, array('Home', 'Back', 'Forward')) ) { $where = 'Back'; } $do = 'Go' . $where; for ( $i = 0; $i < $times; $i++ ) { $this->IE->$do(); } } /** * screenshot::document() * * @param mixed $element * @param mixed $set * @return object $this */ public function document( $element, $set ) { eval( '$this->IE->document->' . $element . ' = $set;' ); /* I hate eval too, but I couldn't think of another way of doing this without going into a ridiculous loop, any ideas? */ return $this; } /** * screenshot::body() * * @param mixed $element * @param mixed $set * @return object $this */ public function body( $element, $set ) { eval( '$this->IE->document->body->' . $element . ' = $set;' ); /* I hate eval too, as above */ return $this; } /** * screenshot::set_theatermode() * * @param bool $theatermode * @return object $this */ public function set_theatermode( $theatermode = true ) { if ( $theatermode == SWAP ) { $this->IE->TheaterMode = !$this->theatermode; $this->theatermode = !$this->theatermode; } else { $this->IE->TheaterMode = ( bool )$theatermode; $this->theatermode = ( bool )$theatermode; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::title() * * @param mixed $title * @return object $this */ public function title( $title ) { $this->IE->document->title = $title; return $this; } /** * screenshot::content() * * @param mixed $content * */ public function content( $content ) { $this->IE->document->body->InnerHTML = $content; return $this; } /** * screenshot::size() * * @param bool $height * @param bool $width * @return object $this */ public function size( $height = false, $width = false ) { if ( !$height and !$this->height ) { $this->height = 600; $this->IE->Height = 600; } elseif ( $height ) { $this->height = intval( $height ); $this->IE->Height = intval( $height ); } if ( !$width and !$this->width ) { $this->width = 600; $this->IE->Width = 600; } elseif ( $width ) { $this->width = intval( $width ); $this->IE->Width = intval( $width ); } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::position() * * @param bool $top * @param bool $left * @return object $this */ public function position( $top = false, $left = false ) { if ( !$left and !$this->left ) { $this->left = 100; $this->IE->Left = 100; } elseif ( $left ) { $this->left = intval( $left ); $this->IE->Left = intval( $left ); } if ( !$top and !$this->top ) { $this->top = 100; $this->IE->Top = 100; } elseif ( $top ) { $this->top = intval( $top ); $this->IE->Top = intval( $top ); } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::error() * * @param string $errmsg * @param integer $die * @return false */ private function error( $errmsg = '', $die = 0 ) { if ( !$errmsg ) { $errmsg = 'An unspecified error occured.'; } echo '<h1>Error</h1><h2>' . $errmsg . '</h2>'; if ( $die ) die(); return false; } /** * screenshot::pump() * * @param integer $time * @param integer $force * @return bool true */ public function pump( $time = 100, $force = 0 ) { if ( $force == 1 ) { com_message_pump( intval($time) ); } while ( $this->IE->Busy ) { com_message_pump( intval($time) ); } return true; } /** * screenshot::screenshot() * * @param mixed $what * @return object $this */ public function screenshot( $what = WINDOW ) { if ( !$this->visible ) { $this->set_visible( true ); $reset_visible = true; } $this->image = null; $this->pump( 500 ); $function = 'imagegrab' . ( ($what == SCREEN or strtolower($what) == 'screen') ? 'screen' : 'window' ); $im = $function( $this->IE->HWND, 0 ); $this->image = $im; if ( isset($reset_visible) ) { $this->set_visible( false ); } return $this; } /** * screenshot::output() * * @param string $imagetype * @return bool true */ public function output( $imagetype = 'png' ) { if ( !$this->image ) { $this->screenshot(); } if ( $imagetype == 'jpg' ) { $imagetype = 'jpeg'; } if ( !in_array($imagetype, array('jpeg', 'gif', 'png')) ) { $imagetype = 'png'; /* We know this one works */ } $function = 'image' . $imagetype; header( 'Content-type: image/' . $imagetype ); $function( $this->image ); return true; } /** * screenshot::__toString() * * @return mixed */ public function __toString() { if ( $this->image ) { return $this->image; } elseif ( $this->url ) { return $this->url; } else { return ''; } } /** * screenshot::save() * * @param mixed $file * @param string $imagetype * @return image */ public function save( $file, $imagetype = 'png' ) { if ( !$this->image ) { $this->screenshot(); } if ( $imagetype == 'jpg' ) { $imagetype = 'jpeg'; } if ( !in_array($imagetype, array('jpeg', 'gif', 'png')) ) { $imagetype = 'png'; /* We know this one works */ } $function = 'image' . $imagetype; return $function( $this->image, $file ); } /** * screenshot::__destruct() * * @return object $this */ public function __destruct() { return $this->quit(); } } ?>
Script seluruhnya beserta contoh-contoh penggunaannya silahkan download
<?php defined( 'WINDOW' ) or define( 'WINDOW', 10001 ); defined( 'SCREEN' ) or define( 'SCREEN', 10002 ); defined( 'SWAP' ) or define( 'SWAP', 10003 ); set_time_limit( 60 ); /** * screenshot * * @package Screenshot * @author Danltn * @copyright 2008 * @license GPL * @version 0.1 Beta * @access public */ class screenshot { public $image = null; // This is  the image public $details = array(); // Any details we collect protected $IE = null; // IE instance protected $url = false; // URL we're using private static $instance; // Class Instance protected $visible = false; // IE visibility status protected $fullscreen = false; // IE fullscreen status protected $height = false; // IE height protected $width = false; // IE width protected $silent = false; // IE silent status protected $status_bar = false; // IE status bar status protected $address_bar = false; // IE address bar status protected $top = false; // IE position from top protected $left = false; // IE position from left protected $resizable = false; // IE resizable status protected $theatermode = false; // IE theater mode status protected $toolbar = false; // IE toolbar status public $pump = false; // Should we pump after every action /** * screenshot::__construct() * * @param bool $pump * @param bool $height * @param bool $width * @return class $this */ public function __construct( $pump = false, $height = false, $width = false ) { $this->check_compatibility() or die( $this->error('PHP too old or functions missing!') ); register_shutdown_function( array(&$this, "__destruct") ); $this->start_ie(); $this->size( $height, $width ); if ( $pump ) { $this->pump = true; } return $this; } /** * screenshot::navigate() * * @param string $url * @return bool true */ public function navigate( $url = 'about:blank' ) { $url = ( $url ) ? $url : 'about:blank'; $this->IE->Navigate( ($url) ? $url : 'about:blank' ); $this->url = $url; $time = time(); while ( $this->IE->ReadyState != '4' and $time + 2 > time() ) { $this->pump(); } if ( $this->pump ) { $this->pump( 1000 ); } return true; } /** * screenshot::silent() * * @param bool $silent * @return object $this */ public function silent( $silent = true ) { if ( $silent == SWAP ) { $this->IE->Silent = !$this->silent; $this->silent = !$this->silent; } else { $this->IE->Silent = ( bool )$silent; $this->silent = ( bool )$silent; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::get_handle() * * @return handle */ public function get_handle() { return $this->IE->HWND; } /** * screenshot::check_compatibility() * * @return bool true/false */ private function check_compatibility() { if ( version_compare(phpversion(), "5.2.2", "<") ) { $this->error( 'PHP Version too old, 5.2.2 required.', 1 ); return false; } if ( !function_exists('imagegrabwindow') or !function_exists('com_message_pump') or !function_exists('imagepng') or !class_exists('COM') ) { $this->error( 'Required PHP functions missing.', 1 ); return false; } return true; } /** * screenshot::start_ie() * * @return object $this */ public function start_ie() { $this->IE = new COM( "InternetExplorer.Application" ) or die( $this->error('Could not start Internet Explorer instance.') ); if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::quit() * * @return object $this */ public function quit() { if ( is_object($this->IE) ) { $this->IE->Quit(); } $this->IE = null; unset( $this->IE ); return $this; } /** * screenshot::details() * * @return object $this->details */ public function details() { $this->details['path'] = $this->IE->Path; $this->details['fullname'] = $this->IE->FullName; $this->details['name'] = $this->IE->Name; $this->details['offline'] = $this->IE->Offline; return $this->details; } /** * screenshot::set_visible() * * @param bool $visible * @return object $this */ public function set_visible( $visible = true ) { if ( $visible == SWAP ) { $this->IE->Visible = !$this->visible; $this->visible = !$this->visible; } else { $this->IE->Visible = ( bool )$visible; $this->visible = ( bool )$visible; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::set_resizable() * * @param bool $resizable * @return object $this */ public function set_resizable( $resizable = true ) { if ( $resizable == SWAP ) { $this->IE->Resizable = !$this->resizable; $this->resizable = !$this->resizable; } else { $this->IE->Resizable = ( bool )$resizable; $this->resizable = ( bool )$resizable; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::status_bar() * * @param bool $status_bar * @return object $this */ public function status_bar( $status_bar = false ) { if ( $status_bar == SWAP ) { $this->IE->StatusBar = !$this->status_bar; $this->status_bar = !$this->status_bar; } else { $this->IE->StatusBar = ( bool )$status_bar; $this->status_bar = ( bool )$status_bar; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::address_bar() * * @param bool $address_bar * @return object $this */ public function address_bar( $address_bar = false ) { if ( $address_bar == SWAP ) { $this->IE->AddressBar = !$this->address_bar; $this->address_bar = !$this->address_bar; } else { $this->IE->AddressBar = ( bool )$address_bar; $this->address_bar = ( bool )$address_bar; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::set_fullscreen() * * @param bool $fullscreen * @return object $this */ public function set_fullscreen( $fullscreen = true ) { if ( $fullscreen == SWAP ) { $this->IE->Fullscreen = !$this->fullscreen; $this->fullscreen = !$this->fullscreen; } else { $this->IE->Fullscreen = ( bool )$fullscreen; $this->fullscreen = ( bool )$fullscreen; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::set_toolbar() * * @param bool $toolbar * @return object $this */ public function set_toolbar( $toolbar = true ) { if ( $toolbar == SWAP ) { $this->IE->ToolBar = !$this->toolbar; $this->toolbar = !$this->toolbar; } else { $this->IE->ToolBar = ( bool )$toolbar; $this->toolbar = ( bool )$toolbar; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::go() * * @param string $where * @param integer $times * @return object $this */ public function go( $where = '', $times = 1 ) { $where = ucfirst( strtolower(($where)) ); if ( !in_array($where, array('Home', 'Back', 'Forward')) ) { $where = 'Back'; } $do = 'Go' . $where; for ( $i = 0; $i < $times; $i++ ) { $this->IE->$do(); } } /** * screenshot::document() * * @param mixed $element * @param mixed $set * @return object $this */ public function document( $element, $set ) { eval( '$this->IE->document->' . $element . ' = $set;' ); /* I hate eval too, but I couldn't think of another way of doing this without going into a ridiculous loop, any ideas? */ return $this; } /** * screenshot::body() * * @param mixed $element * @param mixed $set * @return object $this */ public function body( $element, $set ) { eval( '$this->IE->document->body->' . $element . ' = $set;' ); /* I hate eval too, as above */ return $this; } /** * screenshot::set_theatermode() * * @param bool $theatermode * @return object $this */ public function set_theatermode( $theatermode = true ) { if ( $theatermode == SWAP ) { $this->IE->TheaterMode = !$this->theatermode; $this->theatermode = !$this->theatermode; } else { $this->IE->TheaterMode = ( bool )$theatermode; $this->theatermode = ( bool )$theatermode; } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::title() * * @param mixed $title * @return object $this */ public function title( $title ) { $this->IE->document->title = $title; return $this; } /** * screenshot::content() * * @param mixed $content * */ public function content( $content ) { $this->IE->document->body->InnerHTML = $content; return $this; } /** * screenshot::size() * * @param bool $height * @param bool $width * @return object $this */ public function size( $height = false, $width = false ) { if ( !$height and !$this->height ) { $this->height = 600; $this->IE->Height = 600; } elseif ( $height ) { $this->height = intval( $height ); $this->IE->Height = intval( $height ); } if ( !$width and !$this->width ) { $this->width = 600; $this->IE->Width = 600; } elseif ( $width ) { $this->width = intval( $width ); $this->IE->Width = intval( $width ); } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::position() * * @param bool $top * @param bool $left * @return object $this */ public function position( $top = false, $left = false ) { if ( !$left and !$this->left ) { $this->left = 100; $this->IE->Left = 100; } elseif ( $left ) { $this->left = intval( $left ); $this->IE->Left = intval( $left ); } if ( !$top and !$this->top ) { $this->top = 100; $this->IE->Top = 100; } elseif ( $top ) { $this->top = intval( $top ); $this->IE->Top = intval( $top ); } if ( $this->pump ) { $this->pump(); } return $this; } /** * screenshot::error() * * @param string $errmsg * @param integer $die * @return false */ private function error( $errmsg = '', $die = 0 ) { if ( !$errmsg ) { $errmsg = 'An unspecified error occured.'; } echo '<h1>Error</h1><h2>' . $errmsg . '</h2>'; if ( $die ) die(); return false; } /** * screenshot::pump() * * @param integer $time * @param integer $force * @return bool true */ public function pump( $time = 100, $force = 0 ) { if ( $force == 1 ) { com_message_pump( intval($time) ); } while ( $this->IE->Busy ) { com_message_pump( intval($time) ); } return true; } /** * screenshot::screenshot() * * @param mixed $what * @return object $this */ public function screenshot( $what = WINDOW ) { if ( !$this->visible ) { $this->set_visible( true ); $reset_visible = true; } $this->image = null; $this->pump( 500 ); $function = 'imagegrab' . ( ($what == SCREEN or strtolower($what) == 'screen') ? 'screen' : 'window' ); $im = $function( $this->IE->HWND, 0 ); $this->image = $im; if ( isset($reset_visible) ) { $this->set_visible( false ); } return $this; } /** * screenshot::output() * * @param string $imagetype * @return bool true */ public function output( $imagetype = 'png' ) { if ( !$this->image ) { $this->screenshot(); } if ( $imagetype == 'jpg' ) { $imagetype = 'jpeg'; } if ( !in_array($imagetype, array('jpeg', 'gif', 'png')) ) { $imagetype = 'png'; /* We know this one works */ } $function = 'image' . $imagetype; header( 'Content-type: image/' . $imagetype ); $function( $this->image ); return true; } /** * screenshot::__toString() * * @return mixed */ public function __toString() { if ( $this->image ) { return $this->image; } elseif ( $this->url ) { return $this->url; } else { return ''; } } /** * screenshot::save() * * @param mixed $file * @param string $imagetype * @return image */ public function save( $file, $imagetype = 'png' ) { if ( !$this->image ) { $this->screenshot(); } if ( $imagetype == 'jpg' ) { $imagetype = 'jpeg'; } if ( !in_array($imagetype, array('jpeg', 'gif', 'png')) ) { $imagetype = 'png'; /* We know this one works */ } $function = 'image' . $imagetype; return $function( $this->image, $file ); } /** * screenshot::__destruct() * * @return object $this */ public function __destruct() { return $this->quit(); } } ?>
By admin on 14 March, 2010 | Tip & trik Grafik | A comment?

Database
Operators pada PHP
Search Engine
Sekuriti
Seputar PHP
Tip & trik Grafik
Tips trik SEO