PHP

Post thumbnail

Yea, am not that a WordPress fan or a good user but few months ago I was working with it and it was really cool, mainly I love working with backend so I decided to use some features of WordPress which led me into reading bulks of their docs and finally gave me something. Well,…

Read More How to Create Customized External Post Page in WordPress

Its a year now when I was still a cool newbie in PHP thought am not yet expert now 🙂 I was coding something like a forum where users can post and other users can read and comment. I hosted the project and something just hit my head “What if a user posts <script>alert(‘hello’)</script> will…

Read More PHP Security: Protecting Your PHP Projects From XSS Attacks

Post thumbnail

Query not your database too much and leave it to rest, which will absolutely make your page load as fast as a local html file in your PC WHAT IS CACHING? This is the act of storing a data for future retrieval in a faster way. WHERE IS CACHING NEEDED? Well, I should say when…

Read More Create a Fast Loading Dynamic PHP Site Using PHP Caching

Post thumbnail

Hello there, was just surfing on PHP functions in their site and came accross this function and it works great! Though I don’t even know how the Easter is been calculated Below is the script, copy it to a PHP file and save or download the attachment: <?php function check_easter($year) {     $y = getdate(easter_date($year));     if($year<date(‘Y’)) {         $word = ‘was’;     }     else {         $word = ‘is’;…

Read More Check Every Year’s Easter Date Using PHP

Post thumbnail

Hi there, below is a little snippet of what using Proxy in PHP cURL <?php$loginpassw = ”; //your proxy login and password here if any$proxy_ip = ‘202.148.22.171’; //proxy IP here$proxy_port = 80; //proxy port from your proxy list$url = ”; //URL to get//Lets initiate cURL$ch = curl_init();//Some useful things we need for it to workcurl_setopt($ch,…

Read More How to Use Proxy in PHP cURL

Post thumbnail

Sometime ago the time() function in PHP seems to confuse me of not knowing how to use it but I was just told it calls up current time and date. Well, my research later gave me something when I was accessing all functions my Dreamweaver suggests for me. I found the getdate() function and saw…

Read More Extracting Date and Time from time() function in PHP

Below is a little snippet of what you are looking for <?php## Define zip file name define(‘FILENAME’,’vpn.zip’);##Zip Archive namedefine(‘DIR_LOC’,’zip’);## directory to exract the files to//Start new ZipArchive$zip = new ZipArchive;//Opening the file name you defined$zip->open(FILENAME);//Extrating file$zip->extractTo(DIR_LOC);//We are done, closing connection…$zip->close();?>

Read More How to Extract a Zip file Using PHP