What's wrong with a piece of code online?
/**
* Phone number identification.
* @author by ZSC for 2010.03.24
*/
Class gjphone{
protected $imgPath;//Picture path
protected $imgSize;//Picture size
protected $hecData;//Array after separation
protected $horData;//horizontal finishing of data
protected $verData;//Data in portrait arrangement
function __construct ($path) {
$this->imgpath = $path;
}
/**
* Color Separation conversion ...
*
* @param unknown_type $path
* @return Unknown
*/
Public Function Gethec ()
{
$size = getimagesize ($this->imgpath);
$res = Imagecreatefrompng ($this->imgpath);
for ($i =0; $i < $size [1]; + + $i)
{
for ($j =0; $j < $size [0]; + + $j)
{
$rgb = Imagecolorat ($res, $j, $i);
$rgbarray = Imagecolorsforindex ($res, $RGB);
if ($rgbarray [' Red '] < | | $rgbarray [' green ']<125
|| $rgbarray [' Blue '] < 125)
{
$data [$i] [$j]=1;
}else{
$data [$i] [$j]=0;
}
}
}
$this->imgsize = $size;
$this->hecdata = $data;
}
/**
* Color separation after the data horizontal finishing ...
*
* @return Unknown
*/
Public Function Maghordata ()
{
$data = $this->hecdata;
$size = $this->imgsize;
$z = 0;
for ($i =0; $i < $size [1]; + + $i)
{
if (In_array (' 1 ', $data [$i])) {
$z + +;
for ($j =0; $j < $size [0]; + + $j)
{
if ($data [$i] [$j] = = ' 1 ') {
$newdata [$z] [$j] = 1;
}else{
$newdata [$z] [$j] = 0;
}
}
}
}
return $this->hordata = $newdata;
}
/**
* Organize longitudinal data ...
*
* @return Unknown
*/
Public Function Magverdata ($newdata) {
for ($i =0; $i <132;++ $i) {
for ($j =1; $j <13;++ $j) {
$ndata [$i] [$j] = $newdata [$j] [$i];
}
}
$sum = count ($ndata);
$c = 0;
for ($a =0; $a < $sum; $a + +) {
$value = $ndata [$a];
if (In_array (1, $value)) {