Showing posts with label Php. Show all posts
Showing posts with label Php. Show all posts

Wednesday, 3 August 2016

How can I secure my APIs using O-Auth?

php-development1.jpg


I wrote some APIs in PHP to expose my website to a greater no of audience.

Now, can anyone help to know how I can secure them using O-Auth.

Read more about How can I secure my APIs using O-Auth? Visit Findnerd.

Monday, 28 December 2015

Why WordPress PHP Platform Best For Blogging Sites

WordPress, an open-source content management system(CMS), is the most popular platform among developers of blogging sites. More than 23.4% of top million websites were using WordPress PHP development as of January 2015. WordPress PHP development is now seen as the most reliable blogging platform, thanks to stability and options to customize through plugins and themes.
Why-WordPress-is-the-Best-Blogging-Platform

What Makes WordPress PHP Development the Best For Blogging Sites


WordPress is the best choice especially to those who are new to blogging as it provides full control over appearance and feel of a site. WordPress frees you from the hassles of coding and comes for free. Other virtues of WordPress PHP platform for blogging sites are:

  • Support for MySQL, SQLite, PostgreSQL (etc)
  • Automatic generation of RSS newsfeeds
  • Easy to trackback and pingback
  • Users can post comments
  • Options to enable or disable comments on a post by post basis
  • Spam protection
  • Requires user registration
  • You can protect private posts through password
  • Offers support for the XML-RPC interface, multiple authors, bookmarklets, etc

With WordPress, you can also publish content on multiple mobile platforms, like Android, iOS, Blackberry, Nokia, Windows Phone 7, WebOS etc. WordPress Theme is a robust feature of WordPress that allows you to make change in your site’s design with a single click of the mouse. There are no adverse impacts of WordPress Theme on your site’s content and you can make as many desirable changes as you want in your site’s design that too in quick time.

Organizing your site’s content was never so easy. WordPress comes with loaded features to help your site organize the content by day, month, year, author, blog, tag or category. Users don’t get a run around on your WordPress site when it comes to finding content they are looking for, thanks to flawless built-in search engine.

You can reach out to masses as WordPress gives you the brilliant option to translate into more than 70 languages. WordPress charges you nothing for code, meaning you can use its code for free to build new applications.

Extensive APIs of WordPress enables developers to customize their applications like the development of custom portal for news sites, some community forums for Php Questions and Answers and it also allows integration into other existing systems. WordPress gives you numerous free plugins to extend functionality and themes to make your WordPress site appear the way you want it to be.

As WordPress PHP development is highly cost-effective, flexible, scalable, secure and easier to use, it certainly becomes the best choice for blogging sites.

Read here similar type Web Mobile App Development Blog at our highly specific C, Java, PHP, Javascript, iPhone, android questions and answers forum about the topic described above “Why WordPress PHP Platform Best For Blogging Sites“. You can also learn much more about different programming technologies and can enhance your tech skills at FindNerd’s iOS Developer Forum.

Friday, 25 September 2015

How to Use Mandrill SMTP in LARAVEL 5?

Using Mandrill SMTP in LARAVEL4 is easy to use by following below changes in cofig/mail.php
 
  1. return array(

  2. /*
  3. |--------------------------------------------------------------------------
  4. | Mail Driver
  5. |--------------------------------------------------------------------------
  6. |
  7. | Laravel supports both SMTP and PHP's "mail" function as drivers for the
  8. | sending of e-mail. You may specify which one you're using throughout
  9. | your application here. By default, Laravel is setup for SMTP mail.
  10. |
  11. | Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log"
  12. |
  13. */

Mandrill-SMTP-in LARAVEL5

-Rad the complete Blog : How to Use Mandrill SMTP in LARAVEL 5?
 
FindNerd’s Php developer forum  is developed for those tech geeks who don’t want to wait for a longer duration of time, as the community members within FindNerd can answer any android query within shortest possible time frame.


Apart from this, If you have any language query like C, Java, JavaScript, iOS, Html, PHP etc . you can post at FindNerd’s Java questions and answers forum.

Thursday, 27 August 2015

REST API in joomla 3.4 with SLIM Framework PART 2

Flowing on from REST API in joomla 3.4 with SLIM Framework PART 1 it's time to to use the real power of Slim Framework. In this second part of tutorial series , we will use SLIM Framework in Joomla way of style to create powerful API.
As we learned in Part 1 of this article, how to load SLIM Framework in our joomla 3.4 project and how to instantiate SLIM framework, directory structure explained in part 1 of this tutorial, in this part we will create index.php file flowing our directory structure.

Let's start

create index.php in /your_project/api/v1/index.php . and paste bellow code, hey don't get confused by seeing this messy line of code , don't worry i will explain each line.
  1. <?php
  2. define('_JEXEC', 1);
  3. define('_API', 1);
  4. define('JPATH_BASE', dirname(dirname(dirname(__FILE__))));
  5. // Include the Joomla framework
  6. require_once JPATH_BASE . '/includes/defines.php';
  7. require_once JPATH_BASE . '/includes/framework.php';

-For complete information, Read the full at: REST API in joomla 3.4 with SLIM Framework PART 2




FindNerd is an effective C, Java, Android, Html, iOS, JavaScript, PHP quetions and answers, to instantly resolve your various language queries.

Apart from this, If you have any html language issue, you can post at HTML developer forum and get instantly resolved it from highly experienced FindNerd community members.

Wednesday, 12 August 2015

Php server variables

Hello Readers,

Today we will discuss about "Php server variables".

$_SERVER is one of the tremendous world-wide specifics within PHP. It includes information regarding headers, server, web host in addition to and many others. Its content has enormous directory information along with proper world-wide indices.

There are few type of variable which we listed below :-
  1. Server information
  2. Header information
  3. Details on PHP page request
  4. File name or path information
  5. Remote user information
SERVER-side-PHP-Variable

- Read the full Blog at: Php server variables

FindNerd is an effective C, Java, Android, Html, iOS, JavaScript, PHP Developer forum, to instantly resolve your various language queries.

Apart from this, If you have any html language issue, you can post at HTML questions and answeres and get instantly resolved it from highly experienced FindNerd community members.

Monday, 10 August 2015

How to do Email validation in Php

Hello Reader's today we will discuss about "Email validation in Php". The below code tells that how to check your email is valid or not. For this we use regular expression for validate email.

  1. <?php
  2. if(isset($_POST['submit']))
  3. {
  4. $email_from = $_POST['email'];
  5. $email_exp = '/^[A-Za-z0-9._%-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,4}$/';
  6. if(preg_match($email_exp,$email_from)) {
  7. echo 'The Email Address you entered does not appear to be valid.';
  8. }
  9. else
  10. {

How to do Email validation in Php

- Read the full set of codes at How to do Email validation in Php FindNerd's Blog.

FindNerd is an effective C, Java, Android, Html, iOS, JavaScript, PHP question and Answers,to instantly resolve your various language queries.
Apart from this, If you have any html language issue, you can post at HTML Help Forum and get instantly resolved it from highly experienced FindNerd community members.

Thursday, 6 August 2015

How to open and read files with PHP


Before reading information from any file,we have to open the file for reading. This Blog will help you to find the code to read-open-close the file(s) on server we have created with PHP.
  1. Opening a file:fopen()
This function enables to open a PHP written file in the specified mode.fopen() not only creates a connection to file but can also open URL
  1. $file_open = fopen("http://127.0.0.1/", "r");
Function fopen( ) doesn't actually read the contents of a file.All it does is to set a pointer to the file which we want to open. It then returns what's call a file handle. Consider an example:
 How to open and read files with PHP
- See the full Blog at: How to open and read files with PHP FindNerd is an effective C, Java, Android, Html, iOS, JavaScript, PHP Developer forum, to instantly resolve your various language queries.

 Apart from this, If you have any html language issue, you can post at HTML questions and answeres and get instantly resolved it from highly experienced FindNerd community members.

Friday, 31 July 2015

How to compare PHP Variables and Arrays with null or empty values


Sometimes it is a bit confusing for developer to select right compare statement to check variables or arrays as there are lots of compare functions like "isset()", "!" operator, "is_null()", "empty()" etc. So we can use a straight forward approach to do this:

1: For boolean value, use:

if ($var) {}
or
if (!$var) {}
 
2: Null or false value:

How to compare PHP Variables and Arrays with null or empty values
Read the full Blog How to compare PHP Variables and Arrays with null or empty values at FindNerd's Forum.

FindNerd is an effective C, Java, Android, Html, iOS, JavaScript, PHP Developer forum, to instantly resolve your various language queries.

Apart from this, If you have any html language issue, you can post at HTML questions and answeres and get instantly resolved it from highly experienced FindNerd community members.  

Wednesday, 22 July 2015

How to Hash Password in Laravel

Laravel provide Bcrypt hashing for store a secure password by using keyword Bcrypt we can hash our password




How to Hash Password in Laravel  


$password = bcrypt('secret');
 
We can use this also  

$password = Hash::make('secret');

- See the complete Blog at: How to Hash Password in Laravel  

FindNerd is a excellent technical community where you can post and look for PHP Questions and Answers . If you need more Blogs related to PHP language then visit to our PHP Blogs.

Tuesday, 21 July 2015

How to Upload Two Separate Files in PHP

Hi, if you want to upload two separate files from one single form to be uploaded and with a for simplest code Look at mine code. The form will have two separate input files but you need to name them common, ex 'files[]' I'm using 'upload[]' in this case.  

For complete information, Visit full Blog: How to Upload Two Separate Files in PHP


  How to Upload Two Separate Files in PHP  


FindNerd community is a right place where you can post and look for PHP Questions and Answers .
If you need more Blogs related to PHP language then visit to our PHP Blogs.

Wednesday, 15 July 2015

InterNationalization in CakePHP

Hello Readers ,

Today we will learn about the concept of ” InterNationalization in CakePHP ” .
“InterNationalization” simply means if you are making an application and you wants to make that applications to reach a larger audience to cater for multiple languages.

InterNationalization in CakePHP

To do this below are the steps-
 
Create a new CakePHP project:
 
Download the latest version from http://cakephp.org/.

For full set of steps/ Code, Visit at: InterNationalization in CakePHP

FindNerd: Being an effective C, C#, Java , PHP forum here you can also post & look for various programming queries along with their solutions including android, java, PHP questions and answers etc.

Tuesday, 14 July 2015

How to Disable Comments Section on Wordpress Page

You need to follow below step to remove comment section in WP Page.
1) Make admin login on Wordpress.

2) You can view "Pages" menu on left panel. On mouse over you can view "All Pages" & "Add New" options. Please click at "All Pages

Disable comments, Wordpress

In this Blog, I am Explaining step by step procedure to Disable Comments Section on Wordpress Page. For the full set of steps Visit my full Blog.

- See full Blog at: How to Disable Comments Section on Wordpress Page
FindNerd is the right place to resolve PHP language problems. Here you can post PHP Questions and Answers.

If you have any query on PHP language, Post it at FindNerd’sPHP Developer Forum.

Monday, 13 July 2015

How to Copy Files in PHP

How to open and read PHP files have been discussed in previous blog:
How to open and read files with PHP

Now,we will discuss about copying a php file.
In php,we can Copy files from “source” to “destination”.
Function used :

    copy(used in PHP 4, PHP 5)

It takes two parameters as input:
1. Destination path
2. Source Path

Syntax:

$file_open = fopen("http://127.0.0.1/", "r");
$file_open = fopen("http://127.0.0.1/", "r");
$file_open = fopen("http://127.0.0.1/", "r");
$file_open = fopen("http://127.0.0.1/", "r");
$file_open = fopen("http://127.0.0.1/", "r");
$file_open = fopen("http://127.0.0.1/", "r");
$file_open = fopen("http://127.0.0.1/", "r");
$file_open = fopen("http://127.0.0.1/", "r");
      copy (string $source, string $destination);
 
- See full Blog at: How to Copy Files in PHP.

FindNerd: Being an effective C, C#, Java ,  PHP Developer forum, here you can also post & look for various programming queries along with their solutions including android, java, PHP questions and answers etc.

Thursday, 9 July 2015

Inheritance in PHP

Hello Readers ,

Here's the explanation of concept of Inheritance in PHP.

What is inheritance?

Inheritance is nothing but a design principle in oops. By implementing inheritance we can inherit(or get) all properties and methods of one class to another class.The class who inherit feature of another class known as child class.The class which is being inherited is know as parent class.
Body of Single level Inheritance.

    class grandParent
    {
    //Body of your class
    }
    class parent extends grandParent
    {
    //Body Of your class
    }
 
Read the full Blog at: Inheritance in PHP .

If you have any query related to PHP language then goto to our PHP Developer Forum.

FindNerd community is a right place where you can post and look for PHP Questions and Answers .

Wednesday, 8 July 2015

Add Logo in Theme Customize Option in Wordpress

Hello reader's today we discuss about "Add logo in theme customize option" in wordpress. Open your function.php and paste the below code :-


/**
* Add logo in theme customize option
*/
add_action( 'customize_register', 'themename_customize_register' );
function themename_customize_register($wp_customize) {
$wp_customize->add_section( 'ignite_custom_logo', array(
'title' => 'Logo',
'description' => 'Display a custom logo?',
'priority' => 25,
) );
$wp_customize->add_setting( 'custom_logo', array(
'default' =>; '',
) );
 
 
- See full Blog at: Add Logo in Theme Customize Option in Wordpress


FindNerd is the right place to resolve PHP language problems. Here you can post PHP Questions and Answers.
If you have any query on PHP language, Post it at FindNerd's - PHP Developer Forum.
Hello reader's today we discuss about "Add logo in theme customize option" in wordpress. Open your function.php and paste the below code :-
  1. /**
  2. * Add logo in theme customize option
  3. */
  4. add_action( 'customize_register', 'themename_customize_register' );
  5. function themename_customize_register($wp_customize) {
  6. $wp_customize->add_section( 'ignite_custom_logo', array(
  7. 'title' => 'Logo',
  8. 'description' => 'Display a custom logo?',
  9. 'priority' => 25,
  10. ) );
  11. $wp_customize->add_setting( 'custom_logo', array(
  12. 'default' =>; '',
  13. ) );
- See more at: http://findnerd.com/list/view/Add-logo-in-theme-customize-option-in-wordpress/3364/#sthash.QJ5eQfOw.dpuf

Tuesday, 7 July 2015

Using Database Session Handling in Code PHP

PHP is one of the scripting language. In which session handling is one of the key thing mostly using in web application.


Suppose you build a website and allow to login everyone in website, You need to track user every step until they log out our system, Its called Session tracking.

Now the question is why we need to track the session, answer is very simple .HTTP state less protocol, When you refresh you page, Its lost every information, So this is the reason we need session handling.


To handle session in php we need to a global variable $_SESSION and session_start()


- Read full more at: Using Database Session Handling in Code PHP

If you have any query related to PHP language then goto to our PHP Developer Forum. FindNerd community is a right place where you can post and look for PHP Programming Questions and Answers .

Monday, 6 July 2015

How to Calculate Distance Between Two location by PHP Code

If you would like to calculate air distance between two location without any API or mysql query. You can use below code to get distance between two location.

  1. $distance_one_latitude = 30.364267;
  2. $distance_two_latitude = 30.324860;
  3. $distance_one_longitude = 78.087412;
  4. $distance_two_longitude = 78.052046;


- Read full Blog at:  How to Calculate Distance Between Two Location by PHP Code

If you have any query related to PHP language then login to our PHP Developer Forum. FindNerd community is a right place where you can post and look for PHP Programming Questions and Answers .

Friday, 3 July 2015

How to Apply Style to a Cakephp Debug Console

We have cakephp debug on or off option in core.php file, if debug is on then all errors and query will show at the bottom of the page. we can give it some different style or UI so that it will be more readable. we can apply css like below code
  1. .cake-sql-log {
  2. position:fixed;
  3. top:99%;
  4. z-index:10;
  5. width:100%;
  6. background-color:black;
  7. color:white;
  8. border-collapse:collapse;
Read full blog at: How to Apply Style to a Cakephp Debug Console


If you have any query related to PHP language then ask at our PHP Developer Forum, which is an excellent place to post and look for PHP Programming Questions and Answers
 

Wednesday, 1 July 2015

PHP filters to Sanitize and Validate data

Hello Readers,


Today we will going to understand the concept of PHP filters to Sanitize and Validate data. PHP filters are used to validate and sanitize external input. Validating data = Determine if the data is in proper form. Sanitizing data = Remove any illegal character from the data...


Read the full Blog with complete information at: PHP filters to Sanitize and Validate Data

If you have any query related to PHP language then FindNerd community is a right place where you can post and look for PHP Programming Questions and Answers

Tuesday, 30 June 2015

Using multiple database connections in CakePHP model

Hello Readers,

Till now we may develop our application with single database . Is their any ways to integrate our application with multiple databases ? . Yes we have. There are methods to use multiple databases for development and for production without changing anything but rewriting a function in DATABASE_CONFIG class. Just open your database.php file inside config folder and search this class "DATABASE_CONFIG". Here you can add multiple database configuration.
  1. class DATABASE_CONFIG {
  2. public $default = array(
  3. 'datasource' => 'Database/Mysql',
  4. 'persistent' => false,
  5. 'host' => 'localhost',
  6. 'login' => 'username',
  7. 'password' => 'password',
  8. 'database' => 'database1',
  9. 'prefix' => '',
  10. //'encoding' => 'utf8',
  11. );
  12. public $test1 = array(
  13. 'datasource' => 'Database/Mysql',
  14. 'persistent' => false,
  15. 'host' => 'localhost',
  16. 'login' => 'username',
  17. 'password' => 'password',
  18. 'database' => 'database2',
  19. 'Prefix PHP' => '',
  20. //'encoding' => 'utf8',
  21. );
  22. public $test2 = array(
  23. 'datasource' => 'Database/Mysql',
  24. 'persistent' => false,
  25. 'host' => 'localhost',
  26. 'login' => 'username',
  27. 'password' => 'password',
  28. 'database' => 'database3',
  29. 'prefix' => '',
  30. //'encoding' => 'utf8',
  31. );
  32. }
The default database is "public $default" , if you want to use database2 you have to initialize "public $test 1" in your Model.

Open your UserModel.php
 
For further queries or PHP Programming Questions and Answers you can Visit to our PHP Developer Forum