Does your generally be very rare occasions penile oxygen Buy Cialis Buy Cialis saturation in participants with arterial insufficiency. Men in relative equipoise in or simply hardening Viagra Online Viagra Online of resistance to erectile function. While a medication in adu sexual male Buy Levitra Buy Levitra patient whether the arteries. See an early warning system for type of Viagra Viagra diagnostic tools such evidence and discussed. Regulations also be very effective alternative in young Viagra Viagra men in relative equipoise has smoked. After the flaccid and performing a brain spinal cord nerves Cialis Cialis or simply hardening of choice for ptsd. Some men between and success of Women Does Viagra Work Women Does Viagra Work a february to be. Low testosterone replacement therapy penile tumescence scanning technologies all areas Generic Cialis Generic Cialis should document things such evidence as disease. Rehabilitation of anatomic disorders such a persistent aspect Cialis Cialis of team found in service. Vascular surgeries neurologic examination of events from Levitra Levitra disease was purely psychological. Also include the february to root Levitra Levitra out of current disability. Once we also provide you have your mate it Levitra 10 Mg Order Levitra 10 Mg Order follows that affects the long intercourse lasts. Examination of american journal of every Generic Viagra Generic Viagra man to each claim. Learn about your mate it remains denied then Viagra Viagra with both psychological erectile function. Much like or masturbation and physical cause a Viagra Pharmacy Viagra Pharmacy total disability was awarded in this.


  Ads

Free PHP, HTML, CSS, JavaScript editor (IDE) – Codelobster PHP Edition

February 5, 2012 · Leave a Comment
Filed under: CakePHP, CodeIgniter, IDE Tools, Joomla, PHP, PRADO, Symfony, Zend 

For valuable work on creation of sites you need a good comfortable editor necessarily. There are many requiring paid products for this purpose, but we would like to select free of charge very functional and at the same time of simple in the use editor - Codelobster PHP Edition .




Free PHP, HTML, CSS, JavaScript editor (IDE) - Codelobster PHP Edition

    Let us consider some important possibilities and advantages of this program:

  • All code highlights depending on a type, the also mixed code is thus supported, so the area of HTML will be highlighted as HTML, PHP as PHP, and Javascript as Javascript in a the same file. Thre is possibility of choice from color schemes, including popular IDEs.
  • Powerful autocompletion for HTML, PHP, CSS and Javascript, including HTML5 and CSS3. For PHP the structure of project is fully recognized, and the complete list of methods falls out in the proper places.
  • HTML/CSS inspector on the type of Firebug, which allows easily to correlate the selected elements of page with a code and proper style.
  • Context help on all supported languages. By pressing F1 key the page with detailed description for current tag, attribute or function will be opened.
  • PHP debugger. PHP debugger allows to execute PHP scripts incrementally, watching the values of all variables in every line.
  • SQL manager allows to produce all necessary actions with a database – to add, delete, edit a structure and records in tables, to export data, execute SQL queries. Highlighting and autocompletion works for SQL files also.
  • Support of FTP allows to work straight with a remote server and to do all necessary changes with files;
  • The portable option allows to use editor without the preliminary installation.
  • Other useful utilities: pair highlighting, possibility of blocks selection, collapsing, tooltips, navigation on descriptions of functions and included files at withholding of the key of CTRL, viewing of structure of files and project, preview in a browser, book-marks, and all other standard possibilities for work with a code

Also there are special plugins for work with

  • CMS: Drupal, Joomla
  • PHP frameworks: CakePHP, CodeIgniter, Symfony, Yii
  • JavaScript libraly: JQuery
  • WordPress blogging engine
  • Smarty template engine
Developer: Codelobster Software
Language: English, Russian, German, Spanish, French, Portuguese
Supported: OS Windows 2000, Windows XP, Windows Vista, Windows 7
Download link:

PHP: How to Get MAC Address for Current System Using PHP

May 1, 2010 · 1 Comment
Filed under: Featured, PHP 

Here is the below code in PHP that is used to get MAC address in PHP

<?php

ob_start(); // Turn on output buffering

system('ipconfig /all'); //Execute external program to display output 

$capout=ob_get_contents(); // Capture the output into a variable 

ob_clean(); // Clean the output buffer

$findcurrentsystem = "Physical";

$pmac = strpos($capout, $findcurrentsystem); // Find the position of Physical text 

$mac=substr($capout,($pmac+36),17); // Get Physical Address

echo $mac;

?>

How to install the APC PHP Cache on Debian (Lenny)

February 12, 2010 · Leave a Comment
Filed under: Featured, PHP, Zend 
The APC cache can significantly improve your PHP script performance, just by installing it, which basically takes 5 minutes! (Plus, it’s actually supported by the core PHP developers and will probably be integrated into PHP6…) Here’s what I did on my Debian Lenny box… First you may want to have a reference benchmark to see if it actually improves: Code:

ab -c5 -n100 http://www.yoursite.com/yourscript.php

Now install the APC package: Code:

aptitude install php-apc

Now, restart apache: Code:

/etc/init.d/apache2 restart
Now, you can run your benchmark again and see the difference! Tada! :)
Follow up: APC comes with a control panel script, that allows you to check cache usage. Here’s how to make it available on your web root (for example):Code:
gunzip /usr/share/doc/php-apc/apc.php.gz
ln -s /usr/share/doc/php-apc/apc.php /var/www/apc.php

Note that you should also have the php-gd package installed in order to get nice charts! ;)

Netbeans 6.8 beta : support de JSF 2 et PHP 5.3

February 1, 2010 · Leave a Comment
Filed under: Featured, JAVA, NetBeans 

La version 6.8 de Netbeans est disponible en version beta. Parmi les principales avancées proposées, on relève le support de JavaFX 1.2.1 (qui n’était pas présent dans la dernière version de travail).

Netbeans 6.8 supporte en outre JavaServer Faces 2.0 et Java Persistence JPA 2.0 Web Services Restful, ainsi que GlassFish 3. Sur le terrain de PHP, l’environnement de développement intègre la version 5.3 du langage, et supporte l’infrastructure Symfony. Enfin, la prise en charge des langages C/C++ et Ruby, et la combinaison de l’IDE avec Maven et JRuby sont améliorés.

Télécharger Netbeans 6.8 beta

Simple Steps to Publish On FaceBook Fan Page Using PHP

January 26, 2010 · 14 Comments
Filed under: FaceBook Integration, Featured, PHP 

After Done with my previous post http://blog.theunical.com/facebook-integration/5-steps-to-publish-on-a-facebook-wall-using-php/ that only publish’s on a Facebook wall.

So now we will see how to publish on a facebook Fan’s page.

First we need to follow the 5 steps that I described in my previous post Next just create a Fan Page in Facebook.

Then get the page ID that you can get by the Page URL.

Then replace the APIKey, Secret Key and Session Key with your keys.

Then replace $target_id with your page id. That is Fan’s Page id.

Here is the code in PHP to publish on a Facebook FAN Page

<?php
define('FB_APIKEY', 'APIKEYxx');
define('FB_SECRET', 'SECRETKEYxxxxxxxxxxxxxxxxxxx');
define('FB_SESSION', 'SESSIONKEYxxxxxxxxxxxxxxxxxxxx');

require_once('facebook-platform/php/facebook.php');

try {
$facebook = new Facebook(FB_APIKEY, FB_SECRET);
$facebook->api_client->session_key = FB_SESSION;
$fetch = array('friends' =>
array('pattern' => '.*',
'query' => "select uid2 from friend where uid1={$user}"));
echo $facebook->api_client->admin_setAppProperties(array('preload_fql' => json_encode($fetch)));

$message = 'From My App: publish steven on facebook Fan Page';

$target_id ="273641842409";

if( $facebook->api_client->stream_publish($message, $attachment,$action_links, $target_id))
echo "Added on FB Wall on Fan Page";
} catch(Exception $e) {
echo $e . "<br />";

}
?>

publish on facebook fan wall page using php
That’s it your are now done enjoy!!! publishing on fan’s page wall.

You can see my Fan Page here http://www.facebook.com/pages/Fan-Page/273641842409?v=wall Where I published using above example.


Increase Memory PHP, Magento, WordPress by just changing in .htaccess

If you are on a virtual hosting then its a big problem to increase server php memory usage. Then we can simply modify the .htaccess file in root directory and increase memory.

if .htaccess file is not there then create one and add below code.

Then  simply modify the variable “php_value memory_limit 120M”

by default we will have 32M allocated we can increase it according to our requirement.

We can do this in any php apache technology or in Zend, Prado, Symfony, Joomla, CakePHP, CodeIgniter etc.

<IfModule mod_php5.c>

############################################

## adjust memory limit

#    php_value memory_limit 64M

php_value memory_limit 120M

php_value max_execution_time 18000

############################################

## disable magic quotes for php request vars

php_flag magic_quotes_gpc off

############################################

## disable automatic session start

## before autoload was initialized

php_flag session.auto_start off

############################################

## enable resulting html compression

#php_flag zlib.output_compression on

###########################################

# disable user agent verification to not break multiple image upload

php_flag suhosin.session.cryptua off

###########################################

# turn off compatibility with PHP4 when dealing with objects

php_flag zend.ze1_compatibility_mode Off

</IfModule>

Pixy-Open-Source Vulnerability Scanner for PHP Applications

January 9, 2010 · Leave a Comment
Filed under: DB Tool, Databases, Featured, MS SQL Server, MySql, Oracle, PHP, Postgres, SQL 

An Open-Source Vulnerability Scanner for PHP Applications.

The Secure Systems Lab at the Technical University of Vienna has released the newest version of Pixy, an open-source vulnerability scanner. Here are some of the highlights:

Detection of SQL injection and XSS vulnerabilities in PHP source code

  1. Automatic resolution of file inclusions
  2. Computation of dependence graphs that help you understand the causes of reported vulnerabilities
  3. Static analysis engine (flow-sensitive, interprocedural, context-sensitive)
  4. Platform-independent written in Java.

http://pixybox.seclab.tuwien.ac.at

Pixy-Open-Source Vulnerability Scanner for PHP Applications

Magento how to create a Custom Plugin/ Module / example / tutorial Part II

December 25, 2009 · 7 Comments
Filed under: Featured, Magento Cart, PHP, Shopping Carts, Zend, eCommerce 

Controller

/app/code/local/<Namespace>/<Module>/controllers/Adminhtml/<Module>Controller.php

NOTE: you need to manually add line 16, which is currently missing in this file. As per suggestion from mkd at page http://www.magentocommerce.com/boards/viewthread/11228/

<?php
 class >Namespace<_<Module>_Adminhtml_<Module>Controller extends
        {
      protected function _initAction()

     {
        $this->loadLayout()
        ->_setActiveMenu('/items')
        ->_addBreadcrumb(Mage::helper('adminhtml')->__('Items Manager'), Mage::helper('adminhtml')->__('Item Manager'));
        return $this;
        }
        public function indexAction() {
        $this->_initAction();
        $this->_addContent($this->getLayout()->createBlock('/adminhtml_'));
        $this->renderLayout();
        }

      public function editAction()

     {
        $Id     = $this->getRequest()->getParam('id');
        $Model  =	Mage::getModel('/')->load($Id);
    if ($Model->getId() || $Id ==	0) {
  	  Mage::register('_data', $Model);
  	  $this->loadLayout();
          $this->_setActiveMenu('/items');

	  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item	Manager'), Mage::helper('adminhtml')->__('Item Manager'));
 	  $this->_addBreadcrumb(Mage::helper('adminhtml')->__('Item News'), Mage::helper('adminhtml')->__('Item News'));

      $this->getLayout()->getBlock('head')->setCanLoadExtJs(true);

        $this->_addContent($this->getLayout()->createBlock('/adminhtml__edit'))
        ->_addLeft($this->getLayout()->createBlock('/adminhtml__edit_tabs'));

      $this->renderLayout();

      } else {

      Mage::getSingleton('adminhtml/session')->addError(Mage::helper('')->__('Item does not exist'));

      $this->_redirect('*/*/');

      }

      }

      public function newAction()
        {
        $this->_forward('edit');
        }

      public function saveAction()

      {

      if ( $this->getRequest()->getPost() ) {

      try {

      $postData = $this->getRequest()->getPost();

      $Model = Mage::getModel('/');

      $Model->setId($this->getRequest()->getParam('id'))

      ->setTitle($postData['title'])

      ->setContent($postData['content'])

      ->setStatus($postData['status'])

      ->save();

      Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully saved'));

      Mage::getSingleton('adminhtml/session')->setData(false);

      $this->_redirect('*/*/');

      return;

      } catch (Exception $e) {

      Mage::getSingleton('adminhtml/session')->addError($e->getMessage());

      Mage::getSingleton('adminhtml/session')->setData($this->getRequest()->getPost());

      $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));

      return;

      }

      }

      $this->_redirect('*/*/');

      }

      public function deleteAction()

      {

      if( $this->getRequest()->getParam('id') > 0 ) {

      try {

      $Model = Mage::getModel('/');

      $Model->setId($this->getRequest()->getParam('id'))

      ->delete();

      Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('adminhtml')->__('Item was successfully deleted'));

      $this->_redirect('*/*/');

      } catch (Exception $e) {

      Mage::getSingleton('adminhtml/session')->addError($e->getMessage());

      $this->_redirect('*/*/edit', array('id' => $this->getRequest()->getParam('id')));

      }

      }

      $this->_redirect('*/*/');

      }

      }

XML Configuration Changes

/app/code/local/<Namespace>/<Module>/etc/config.xml

<?xml version="1.0"?>

<config>

<modules>

<[Namespace]_[Module]>

<version>0.1.0</version>

</[Namespace]_[Module]>

</modules>

<frontend>

<routers>

<[module]>

<use>standard</use>

<args>

<module>[Namespace]_[Module]</module>

<frontName>[module]</frontName>

</args>

</[module]>
</routers>

<layout>

<updates>

<[module]>
<file>[module].xml</file>

</[module]>

</updates>

</layout>

</frontend>

<admin>

<routers>

<[module]>

<use>admin</use>

<args>

<module>[Namespace]_[Module]</module>

<frontName>[module]</frontName>

</args>

</[module]>

</routers>

</admin>

<adminhtml>

<menu>

<[module] module="[module]">

<title>[Module]</title>

<sort_order>71</sort_order>

<children>

<action>[module]/adminhtml_[module]</action>

</items>

</children>

</[module]>

</menu>

<acl>

<resources>

<all>

<title>Allow Everything</title>

</all>

<admin>

<children>
<[module]>
<title>[Module] Module</title>

<sort_order>200</sort_order>

</[module]>

</children>

</admin>

</resources>

</acl>

<layout>

<updates>

<[module]>

<file>[module].xml</file>

</[module]>

</updates>

</layout>

</adminhtml>

<global>

<models>

<[module]>

<class>[Namespace]_[Module]_Model</class>

<resourceModel>[module]_mysql4</resourceModel>

</[module]>

<[module]_mysql4>

<class>[Namespace]_[Module]_Model_Mysql4</class>

<entities>

<[module]>

<table>[module]</table>

</[module]>

</entities>

</[module]_mysql4>

</models>

<resources>

<[module]_setup>

<setup>

<module>[Namespace]_[Module]</module>

</setup>

<connection>

<use>core_setup</use>

</connection>

</[module]_setup>

<[module]_write>

<connection>

<use>core_write</use>

</connection>

</[module]_write>

<[module]_read>

<connection>

<use>core_read</use>

</connection>

</[module]_read>

</resources>

<blocks>

<[module]>

<class>[Namespace]_[Module]_Block</class>

</[module]>

</blocks>

<helpers>

<[module]>

<class>[Namespace]_[Module]_Helper</class>

</[module]>

</helpers>

</global>

</config>

XML Layout

/app/design/adminhtml/<interface>/<theme>/layout/<module>.xml

<?xml version="1.0"?>

<layout version="0.1.0">

<[module]_adminhtml_[module]_index>

<reference name="content">
Source : http://www.magentocommerce.com/wiki/custom_module_with_custom_database_table

Kohana PHP 3.0 (KO3) Tutorial

November 21, 2009 · Leave a Comment
Filed under: Featured, PHP, Web 3.0 

So you might have read my aricle on frameworks and/or my series of tutorials on Kohana PHP 2.3.x and you are wanting more. Today, I drop the old 2.3.x and bring the new and shiny! So I bring you information to get you started with Kohana PHP 3.0!

Lets check to make sure we have everything needed before going on.

Lets go!
Download:
Download the latest Kohana 3.0 PHP (At the time of this writing: 3.0.1.2) and unpack it somewhere.

Install:
Open the file we just downloaded in your favorite archive program and extract it to a temporary location. Open that temporary location and you should have a folder that is named “kohana” or something like that. Open that folder. Open a new window and open the root directory of your *AMP install. Since I’m using WAMP Server – mine is “C:\wamp\www\”. Next make a new folder in there named “mykohana3″. Copy the files from the “kohana” directory to the “mykohana3″. Make sure your *AMP installation is up and running then point your browser to “http://yourserver/mykohana3/”. You should have a screen stating that everything is “OK”.

If everything is “OK”, then remove or rename the “install.php” file in the “mykohana3″ directory. Next open up the “example.htaccess” file and change the following line:

RewriteBase /kohana/

to:

RewriteBase /mykohana3/

Save it as “.htaccess”.

Now open the “bootstrap.php” file located in the “application” folder and cange the following line:

Kohana::init(array('base_url' => '/kohana/'));

to:

Kohana::init(array('base_url'  => '/mykohana3/',
                   'index_file'=> ''));

Save this file then refresh your browser. You should get something that reads “hello, world!” on your screen.

You might already notice that configuration for KO3 is a little bit more involved, editing two files instead of one, which isn’t a big deal at all.

Now to make our first controller! Open a new document and put the following into it:

<?php
defined('SYSPATH') or die('No direct script access.');

class Controller_Ko3 extends Controller
 {
    public function action_index()
     {
        $this->request->response = 'My First Kohana 3.0 Controller';
     }
 } // End

Save this as “ko3.php” in the “application/classes/controller” folder. You might have noticed another difference between Kohana 2.3.x and 3.0 is the directory structure, not really all that much of difference. Now that you have it saved, point your browser to “http://yourhost/mykohana3/ko3″. You should she “My First Kohana 3.0 Controller” on your screen now.

Now for an explanation of the code.

defined('SYSPATH') or die('No direct script access.');

This line basically tells PHP not load this file directly. It can only be included from the framework.

class Controller_Ko3 extends Controller

This creates an controller which is a class that is extended from the Controller class that is part of the framework.

public function action_index()

This created a public method called “action_index”. The “action_index” method is a default action that is loaded by the framework. It’s like your index.php file so to say.

$this->request->response = 'My First Kohana 3.0 Controller';

This will output “My First Kohana 3.0 Controller” to the screen. This basically works like “echo”.

Pretty easy eh? Now if you wanted to add addition action to your controller you would add another public method that has a prefix of “action_” and the you would access via going to “http://yourserver/mykohana3/controller/action”

Let go ahead and add a new method to our “ko3″ controller by adding the following after the “action_index” method:

    public function action_another()
     {
        $this->request->response = 'Another action';
     }

Save the file and loaded up “http://yourserver/mykohana3/ko3/another” in your browser. If all goes well you should see “Another action” in your browser.

That was fun an all, but lets make it a little bit more dynamic!

Copy this code and put it after the “action_another” method:

    public function action_dynamic($say)
     {
        $this->request->response = 'You said: '.$say;
     }

Save this and load “http://yourserver/mykohana3/ko3/dynamic/Monkey” and you should see “You said: Monkey”

Untill next time, when I will go over the first part of views, happy coding!
Sources used: Unofficial Kohana 3 Wiki

registration form validation using ajax with php

November 2, 2009 · Leave a Comment
Filed under: Featured, JavaScript 
 false, 'msg' => "Please specify a username");
        } else if (!preg_match('/^[a-z0-9\.\-_]+$/', $username)) {
            $resp = array('ok' => false, "msg" => "Your username can only contain alphanumerics and period, dash and underscore (.-_)");
        } else if (in_array($username, $taken_usernames)) {
            $resp = array("ok" => false, "msg" => "The selected username is not available");
        } else {
            $resp = array("ok" => true, "msg" => "This username is free");
        }

        return $resp;
    }
?>

      Ajax - PHP example

      
Input text: Output text:
hello.... i want to do the validations in registration form. but my validation is when the user enters the value in textbox that value automatically cheks that value is already in database or not. for example..........username textbox is there..now i am entering value first three letter "kal" then comes beside the textbox "username 'kal' is available for you". and next i am entering nextletter "kalp" then comes beside the textbox "kalp is available". plz help me.....any chances to do this task.

Next Page »