Thursday, July 1, 2010

Get current page URL along with SSL protocal and port number In PHP

Hi, Below code will get the current page URL along with SSL protocal and port number

function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
?>
echo curPageURL();
?>

Search features in eclipse editor

Simple search and replace
Ctrl + F

Advanced search and replace
Ctrl + H

When you press Ctrl + H then search window will open in eclipse editor

Containing text: which text do you want to find. Ex: if you don't know some function was defined, then simply you can search for function funname(

File name patterns
*.php will search in all php files
*.* will search win all files

Scope
Workspace OR Enclosing Projects
Workspace means search in all projects
Enclosing Projects means search in current working project

Phonegap - an opensource framework for developing iphone and other applications

Phonegap is an open source framework for developing different mobile applications. By using HTML, CSS and Javascript we can create appliations with core features of iPhone, Ipad, Android, Palm, Symbian, Blackberry etc.,,

Sample code
http://github.com/sintaxi/phonegap

Official website
http://www.phonegap.com/