Category: PHP

  • Understanding View::share in Laravel

    Understanding View::share in Laravel is easy but tricky to new users. Here I will try to clear the confusions of Laravel’s View::share. First look at the code below. We defined a ProfileController and inside it we have a public function as getIndex(). <?php class ProfileController extends BaseController{ public function getIndex(){ $profile_info = User::find(‘2’); View::share(‘getinfo’,$profile_info); $this->layout->content […]

  • How to find multiple occurance of a string in a target text

    May be  all of you know the pros and cons of  strpos() function. Why we use this function? Actually sometimes we need to track the position of a search string in a long text or a paragraph. And  so we  use it. echo strpos($targetstring,$searched_string); And it it will  always show the first occurance of the […]

  • Very interesting Feature Late Static Bindings(LSB) in php 5.3.0

    Php is now widening its scope and solving its limitation to achieve the pure OOP(Object Oriented Programmng). Now we will learn the LSB by observing the code: <?php class parentclass { public static $c_name = __class__; /*this will store the name of the class in $_cname*/ function get_class_name(){ echo”This is the object of “; return […]

  • How to keep your form with its exact layout By using the Zend Form

    Today we will learn how to keep our layout exact like our project main design. We know that if we use Zend form we find some flexibility and advantage for using the component: 1. You can filter and validate the input field. 2. You can group the element or can make the subform. 3. And […]

  • How to add recaptcha in Zend Form

    Its an simple way to add the recaptcha service in your web form. Zend framework reduce your development time by providing the service through its Zend_Service_ReCaptcha. Step-1: You need to signup an account for your domain name or project. Why  you should do this? Because for using the recatcha service you need two key public […]

  • Secure File and Folder permissions for WordPress

    File and folder permissions is very important in terms of web security. In most of the cases hackers are some how manage to get the access of your server and can upload/write/ edit your script and compromise your website. Common form of security regarding this is never allow write permissions to group user and public […]

  • Secure your wp-admin folder in WordPress

    Sometimes you will see that your site has been compromised by hacker. You may have seen that they do it by hacking your wp-admin folder. Your site might be public but you can restrict your wp-admin folder by providing little extra security with a htaccess file. You can limit access to this folder for some […]

  • How to Secure your wordpress site from Hackers

    Several of my websites are hacked today. All of my sites are hosted in Hostgator VPS server and my sites are hacked by “Prishtina Hackers Group”. Thanks to this group who insisted me to seriously thinking about the security of my sites. My sites are hacked that does not means that those hacker group is […]

  • Nice procedure to create a wordpress widget plugin in step by step

    You want to access in the wordpress core development. Really you are a greeks. This nice procedure for you and it will amazed your structural plan and enthusiasm. In the following article we will learn—>How to make a widget plugin? –>How to show the effect  of widget in the content?

  • Rss feed for Custom Post Type – WordPres

    Custom Post Types was one of the most hyped feature of WordPress 3.0. This feature alone expanded the horizon of WordPress usage as a Content Management System (CMS). If you are using Custom Post Types, or thinking of custom post types, then you may have the urge to add it into your main RSS Feed. […]