Website Design Nepal
Web Design Nepal, Website Design Nepal are the basic abstraction of this page.

PHP SOAP WSDL Script

Below is a simple example on how to use SOAP-WSDL with PHP. This example will help you pull data from WSDL using SOAP in PHP.

<?php
$client = new SoapClient("http://footballpool.dataaccess.eu/data/info.wso?wsdl");
$result = $client->TopGoalScorers(array('iTopN'=>5));
 
if ($_POST['topn'] > 0 && (int) $_POST['topn'] <= 20){
  $topn = (int) $_POST['topn'];
  $client = new SoapClient("http://footballpool.dataaccess.eu/data/info.wso?wsdl");
  $result = $client->TopGoalScorers(array('iTopN' => $topn));
  // Note that $array contains the result of the traversed object structure
  $array = $result->TopGoalScorersResult->tTopGoalScorer;
 
  print "
    <table border='2'>
      <tr>
        <th>Rank</th>
        <th>Name</th>
        <th>Goals</th>
      </tr>
  ";
 
  foreach($array as $k=>$v){
    print "
      <tr>
        <td align='right'>" . ($k+1) . "</td>
          <td>" . $v->sName . "</td>
          <td align='right'>" . $v->iGoals . "</td>
        </tr>";
  }
 
  print "</table>";
}
else {
?>
 
  <form id="topscorers" action="1.php" method="post">
    How long should your topscorers list be? (Choose a digit between 1 and 20).
    <input id="topn" name="topn" size="2" type="text" value="10" />
    <input id="submit" name="submit" type="submit" value="submit" />
  </form>
 
<?php
}
?>
Yahoo BuzzWordPressStumbleUponShare
Tags: , , ,
Category : PHP, SOAP, WSDL, XML | 2 Comments »

PHP Programming Tips

Variable Operations

  • Operating on an initialized variable is 376% faster than operating on an unitialized variable.
  • Constants are 146% slower than variables
  • Local variables are 9.9% faster than global variables

String Functions

  • ‘String’ is 0.26% faster than “String”
  • “String” is 4% faster than HEREDOC syntax
  • “String\n” is 108% faster than ‘String’.”\n”
  • ‘String’.$var is 28% faster than “String$var”
  • ‘string ‘.$var.’ string’ is 55% faster than sprintf(‘string %s string’, $var)
  • “\n” is 70% faster than chr(10)
  • strnatcmp() is 4.95% faster than strcmp()
  • strcasecmp() is 45% faster than preg_match()
  • strcasecmp() is 6.6% faster than strtoupper($string) == “STRING”
  • strcasecmp() is 13% faster than strnatcasecmp()
  • strtr($string, $string1, $string2) is 10% faster than str_replace()
  • str_replace() is 161% faster than strtr($string, $array)
  • stristr() is 10% faster than stripos()
  • strpos() is 9.7% faster than strstr()
  • isset($str{5}) is 176% faster than strlen($str) > 5
  • str_replace($str, $str, $str) twice is 17% faster than str_replace(array, array, string)
  • list() = explode() is 13% faster than substr($str, strpos($str))

Numeric Functions

  • ++$int is 10% faster than $int++
  • (float) is 48% faster than settype($var, ‘float’)

Array Functions

  • list() = $array; is 3.4% faster than assigning each variable
  • in_array() is 6% faster than array_search
  • isset($array[$key]) is 230% faster than array_key_exists()
  • !empty($array) is 66% faster than count($array)

Output Functions

  • echo is 5% faster than print()
  • echo ‘ ‘.’ ‘ is 0.44% faster than echo ‘ ‘,’ ‘
Yahoo BuzzWordPressStumbleUponShare
Category : PHP | No Comments »

Free Joomla Admin Templates for Joomla Backend

Probably, Joomla is the best CMS system in the world. However, the admin side of the joomla is quite complicated for general users if we provide the admin details to them. I am in the search of admin templates for a long time but there are only a few free templates for admin side of the Joomla site. For the shake of developers like me, I have created this page to find all  the free admin templates available for users. Here they are:

1. Admin Template with JQuery (UdjamaFlip)

The joomla admin template is using jquery and gives a nice desktop feel similiar to that of a mac. Latest release of this template is beta 1.0. A white version of the template is also available with this version.

Here are some screenshots of the joomla admin template in action:

Link:
http://udjamaflip.com/joomla-jquery-template/63-joomla-admin-template-10beta-new-white-version.html

2. Admin Praise Lite

AdminPraise Lite is a super lightweight Joomla! administrator panel template. Intelligent shortcuts, logical placement, and customization combine to bring you a totally optimized Joomla! experience.

Link:

http://www.adminpraise.com/joomla/admin-templates/free/adminpraise-lite.php

3. Red & Black Admin Template

This red and black admin template is a simple template with large fonts and intuitive interface. The template has large fonts and easy interface.

Link:
http://www.dotcomdevelopment.com/joomla/joomla-downloads/templates/166-joomla-admin-template

Commercial Templates

1. http://themeforest.net/item/simpla-admin-flexible-user-friendly-admin-skin/46073

2. http://showcase.joomlabamboo.com/crisp/administrator/

3. http://www.adminpraise.com/

Yahoo BuzzWordPressStumbleUponShare

Nepali Calendar Module for Joomla

Nepali Calendar Module for Joomla [ad#300x250] Nepali Calendar is a Bikram Sambat based Calendar mostly used in Nepal. Bikram Sambat based Nepali Calendar is approximately 56 years and 81/2 months ahead of the Gregorian calendar. The new year of Nepalese calendar lies in the middle of April. The days of month are not predetermined as in the Gregorian calendar and are calculated on the basis of moments of the planets. Nepali Calendar is used by government of Nepal as official calendar. Bikram Sambat based Nepali Calendar is also used in countries like India, Indonesia, Bangladesh, Sri Lanka, Thailand and Malaysia.

Click Here to Download Joomla Nepali Calendar Module

Installation and Documentation

The installation process is similar to installation of other joomla modules. To install Nepali Calendar module, first download the module by clicking on the above link. After then, log in to the administration site of your joomla site. Then click on the Extension->Install/Uninstall menu. Browse for the mod_npcalendar.zip module from your computer and click on Upload File and Install button to install the component. If everything goes right, a message will be displayed to show the successful installation of the module. The screenshot after the installation is shown below:

Installation of Nepali Calendar

Module Configuration

After the installation of Nepali Calendar Module, you need to configure the module for publishing it in the front page of the site template. To configure the module, go to Extensions->Module Manager. Click on the Nepali Calendar Module which is displayed in the list. You can configure various parameters to show the Nepali Calendar at your required position.

Configure Parameters for Nepali Calendar

In the module parameters section,  you can configure parameters like Day Length, Display links and CSS style sheet for the module. Day length parameter is to display the length of name of the Day. By Default the day length will be fixed to 1, which means for Sunday only S will be displayed and so on. Put zero (0) not to display the day name or put eight (8) to display all the letters of the day. The next parameter is for displaying the next or previous link of the month. If you select no for the links, the user can only view the current month (i.e. User cannot roam around previous and next months).  The third parameter is for changing the css styles of the Module. You can change the width and height, background color and other several design issues by adding appropriate style sheets to this parameters.

Yahoo BuzzWordPressStumbleUponShare
© 2003-2012 Copyright , Young Minds, Kathmandu, Nepal. All rights reserved.