CategoryPHP

Create Secure Scripts with PHP Programming

C

Believe it or not, there is no such thing as a secure program or application, not even with all the firewalls and encryption added in it. Vulnerabilities are already present even when the program or application is still being coded by the programmer, and there is no way for a programmer to eliminate these vulnerabilities. What he or she can do is to minimize the occurrences of these...

WEBSITE DESIGN MADE EASY USING PHP CODE

W

The PHP scripting language has become popular and it was designed specifically for producing web pages. Many web design company Sydney use PHP as the implementation language because it allows them to build a dynamically-generated web page quickly and easily. It gives you the option to create a PHP template that you can use to create and design your website faster. Here are steps on how to design...

Detect User Language With PHP

D

This function uses php server variables to detect the “possible” language of the browser of the connected user. This let you show information with the correct language. Since the HTTP_ACCEPT_LANGUAGE variable contains many information there is some dirty job to do with regular expression to clean the variable and determine the most important value from the ones contained. The HTTP_ACCEPT_LANGUAGE...

Web Services and PHP – SOAP vs XML-RPC vs REST

W

What is web services? In a typical web surfing scenario, a visitor visits a website and use the functionality provided by that particular website.HTTP request is send to server from web browsers and server responses are translated by browser to display the desired result of the visitor. But, this scenario has been changed in the recent days. You don’t need to visit the particular website to use...

Display multiple markers in Google Map

D

<html xmlns=”; <head> <meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″ /> <title>Google Map</title> <script type=”text/javascript” src=”; <script type=”text/javascript”> var markers = [ [‘Bondi Beach’, -33.890542, 151.274856], [‘Coogee Beach’, -33.923036...

Create php webservice in json format

C

<?php include(‘config.php’); $webid = $_GET[‘webid’]; $callback = $_REQUEST[‘callback’]; $sql = “SELECT * FROM `Restaurant_main` where `webid` = ‘$webid'”; $result = mysql_query($sql)or die(mysql_error()); $row1 = mysql_fetch_array($result); $db_webid = $row1[‘webid’]; if($db_webid == $webid){ $sql1 = “SELECT * FROM...

How to use CKeditor in php

H

step 1. Download CKeditor file. step 2. Paste ckeditor file on root directory or you can paste it where the files of your project. step 3. Add the Javascript and code into desired page. Add javascript to the files for which you will use the editor – <script type=”text/javascript” src=”ckeditor/ckeditor.js”></script> <script...

How to run cronjobs per second in php?

H

To run cronjob per second you have to execute crontab/cronjob per minute and then have to run task in cron file per second using PHP function time_sleep_until(). <?php $start = microtime(true); for($ii=0;$ii<60;$ii++) { //………………………. /// here is the tasks which need to run per second… //………………………. time_sleep_until($start + $ii + 1); } // end for if (!function_exists(‘time_sleep_until’)) {...

Category