Python is very faster than PHP

Posted August 31st, 2009 in blog by admin

Today, I am reverse python code to PHP. I run php code in command line. Oh!!! python is very faster than PHP. I waited 30 seconds for convert file. When I used Python,it’s just 1 second for convert file. Same Algorithm, same idea and same file size. However, python is very faster than PHP. We shall not use PHP for search engine, crawling program and Giga bytes file converting.Imm.. I need to learn Python.

Spring Werk XSS Scanner

Posted August 28th, 2009 in blog by admin

Today, I found XSS Scanner that written by python. It’s nice a easy to use. We need to install python and we just run in cmd like that

C:\springenwerk\>python springenwerkgui.py

 

OR

 

C:\springenwerk\>python springenwerk.py –output=result.html http://www.samplepage.com/index.php

After that you will see result in result.html.

 

http://springenwerk.org

PDF with PHP

Posted August 27th, 2009 in blog by admin

Today, my friend ask me “I have a error in my webserver. It’s OK in localhost. It doesn’t show error when I uploaded. Can you check for me ?” I check his code and he is using PDFLib and written by PHP 4. I ask hime “What version of PHP use in your web server ? It’s using PHP 5.Oh! That is a problem because your are written by PDFLib PHP 4 version. You should change to version 5.”

“Oh! PDFLib is not free.Free for personal and not for comerical.” So I adivce him to use ဿFPDF. I love FPDF because we can use include function and we call it. If you use PDFLib, you should add .dll or lib in php.ini. So, I use FPDF. You can download package and it also include tutorial in tutorial folder.

Same Code are here
[sourcecode lang="php"]
<?php
require(‘../fpdf.php’);

$pdf=new FPDF();
$pdf->AddPage();
$pdf->SetFont(‘Arial’,'B’,16);
$pdf->Cell(40,10,’Hello World!’);
$pdf->Cell(40,20,’TESTING’);
$pdf->Output();
?>
[/sourcecode]

Bot Cover Shield

Posted August 23rd, 2009 in blog by admin

Today, I finished Bot Cover Shield with PHP. My blog ,www.saturngod.net, always occur CPU limit over and I think many bot come to my blog. So, I stop the bot and I just allow google bot. In Theory, Bot can’t save cookies (it may be use cookies but not sure). So, I am using saving cookies system.

[sourcecode lang="php"]
<?php
if(isset($_POST['submit_dos']))
{
    setcookie(“checkhuman”, “process”, time()+3600);
    header(“Location:”.$_SERVER['HTTP_REFERER' ]);
}
function chkcookies()
{
    if(isset($_COOKIE["checkhuman"]))
    {
        if($_COOKIE["checkhuman"]==”process”)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
    else
    {
        return false;
    }
}
if(! chkcookies())
{

    $ip=$_SERVER['REMOTE_ADDR'];

    if(($ip != “66.249.66.1″) && ($ip != “66.249.65.133″) && ($ip != “66.249.67.72″) && ($ip != “66.249.72.137″))
    {
        echo “If you are human click “;
        echo “<form action=’index.php’ method=post>”;
        echo “<input type=’submit’ value=’here’ name=’submit_dos’ /></form>”;
        exit();
    }

}
?>
[/sourcecode]

I add this code in header.php of wordpress template. So, our blog can cover the bots easily.

Could not find FlashPaper Printer

Posted August 20th, 2009 in blog by admin

I am using Flash Paper now. It’s a light weight and we can share our book in online. I installed Flash paper and printer is not found. It alwyas alert message “reinstall”. So, I reinstall the program and not working in Vista. Ok. The last helper is googling. I am searching in google and I found that link.

http://kb2.adobe.com/cps/670/2fc670f6.html

and then download printer installer.

http://kb2.adobe.com/support/flashpaper/ts/documents/2fc670f6/fpdriver_install.zip

It’s not complete ok. Printer will appear after install fpdriver.Need to some fix it.

Printer > Macromedia FlashPaper > R-Click > Properties > Ports and then change to FlashPaperPrinterPort.

I hope this will be helpful to you.

Page 1 of 3123