tag:blogger.com,1999:blog-44938561169282073592024-02-22T02:47:40.865-08:00Global Web SolutionPHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.comBlogger50125tag:blogger.com,1999:blog-4493856116928207359.post-21250919685138784172018-11-09T02:38:00.001-08:002018-11-09T02:38:09.579-08:00Superior Swiss Hot Cocoa Mix, 50 packets (1 oz ea.) - Free Whipper<a href="https://koffee-express.com/cappuccino-hot-cocoa/mix/hot-cocoa-envelopes-superior-50-1-oz#.W-VjdYQ87xc.blogger">Superior Swiss Hot Cocoa Mix, 50 packets (1 oz ea.) - Free Whipper</a><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-77540252580985795112013-08-31T03:22:00.000-07:002015-08-18T04:11:24.220-07:00How to enable Gzip on your website<div dir="ltr" style="text-align: left;" trbidi="on">
<h1 style="color: #333333; font-family: sans-serif; font-size: 3.4em; letter-spacing: -0.05555556em; line-height: 1; margin-bottom: 1.5rem;">
Enable Gzip Compression</h1>
<div>
<span style="font-family: sans-serif; font-size: 17px; line-height: 28px;">Compression is enabled by adding some code to a file called .htaccess on your web host/server. This means going to the file manager (or wherever you go to add or upload files) on your webhost. The .htaccess file controls many important things for your site. If you are not familiar with the .htaccess file.</span></div>
<div>
<span style="font-family: sans-serif; font-size: 17px; line-height: 28px;"><br /></span></div>
<div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"><br /></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"><IfModule mod_mime.c></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> AddType application/x-javascript .js</span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> AddType text/css .css</span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"></IfModule></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"><IfModule mod_deflate.c></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/javascript</span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> <IfModule mod_setenvif.c></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> BrowserMatch ^Mozilla/4 gzip-only-text/html</span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> BrowserMatch ^Mozilla/4\.0[678] no-gzip</span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> BrowserMatch \bMSIE !no-gzip !gzip-only-text/html</span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> </IfModule></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> <IfModule mod_headers.c></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> Header append Vary User-Agent env=!dont-vary</span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"> </IfModule></span></span></div>
<div>
<span style="font-family: sans-serif;"><span style="font-size: 17px; line-height: 28px;"></IfModule></span></span></div>
<div style="font-family: sans-serif; font-size: 17px; line-height: 28px;">
<br /></div>
</div>
<div style="font-family: sans-serif; font-size: 17px; line-height: 28px;">
<br /></div>
<div style="font-family: sans-serif; font-size: 17px; line-height: 28px;">
<h2 style="color: dimgrey; font-size: 1.7rem; font-weight: 500; letter-spacing: -0.05555556em; line-height: 1.5; margin-bottom: 1.5rem;">
Enable compression on Apache webservers</h2>
<div style="margin-bottom: 1.5rem;">
The instructions above will work on Apache.</div>
</div>
</div>
<script type="text/javascript" language="javascript"> var aax_size='728x90'; var aax_pubname = 'gwebsolutionb-21'; var aax_src='302'; </script><script type="text/javascript" language="javascript" src="http://c.amazon-adsystem.com/aax2/assoc.js"></script>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com3tag:blogger.com,1999:blog-4493856116928207359.post-74494460483477955512013-07-08T22:06:00.000-07:002013-07-08T22:06:01.267-07:00Most Useful CMS in dot net<div dir="ltr" style="text-align: left;" trbidi="on">
<b><span style="color: #0b5394;">Most Useful CMS in dot net</span></b><br />
<br />
<b><span style="color: #990000;">Microsoft ASP.NET</span></b><br />
<br />
<b><span style="color: red;">Composite C1 </span></b><br />
<br />
<span style="color: #38761d;"><b>History</b></span><br />
<br />
Composite C1 development began mid-2007, it reached version 1.0 in January 2009 and until September 2010 was sold as a commercially licensed product, primarily to customers in northern Europe.<br />
On 29 September, 2010, Composite released C1 version 2.0 as free open source software under the Mozilla Public License, pledging to continue development on the free core and providing paid services.<br />
In October 2010, Composite C1 was added to the .NET 4 enabled parts of Microsoft's Web App Gallery (Web Platform Installer 3 and WebMatrix).<br />
In March 2011, Composite C1 version 2.1 was released, making SQL Server support part of the open source project.<br />
In December 2011, Composite C1 version 3.0 was released, improving on the developer and content editor user experience and adding ASP.NET Razor as a layout template technology option.<br />
<br />
<span style="color: #6aa84f;"><b>Website </b></span>:<span style="color: blue;"><span class="Apple-tab-span" style="white-space: pre;"> </span>http://www.composite.net</span><br />
<br />
<b><span style="color: #38761d;">Source code and community ratings</span></b><br />
<br />
The source code, issue tracker and forum for Composite C1 is hosted at http://CompositeC1.codeplex.com/ - the CodePlex site also contain user ratings and reviews that can not be moderated.<br />
<br />
<span style="color: #38761d;"><b>Modules (C1 packages)</b></span><br />
<br />
Content versioning<br />
Newsletters<br />
Extranet<br />
Page comments<br />
Issuu reader<br />
RSS / Twitter / YouTube feed readers<br />
XML to SQL Server migration<br />
Google Search (CSE) integration<br />
Microsoft Search Server integration<br />
Package Creator<br />
Data Forms Renderer<br />
ASP.NET MVC Player<br />
Social Media integrations (Facebook, Twitter, Google+)<br />
<br />
<br />
<br />
<span style="color: #38761d;"><b>Features</b></span><br />
<br />
Multilingual, UNICODE support<br />
Multiple document interface<br />
Publishing workflow<br />
Content security<br />
WYSIWYG editor<br />
XHTML compatible<br />
XSLT developer tooling<br />
.NET 4 and ASP.NET 4 based<br />
Transparent XML and SQL Server support via LINQ<br />
Side-by-side support for both ASP.NET Razor, ASP.NET Web Forms and ASP.NET MVC<br />
Support for templating using plain HTML, ASP.NET Razor, ASP.NET Master Pages and XSLT<br />
Run on Internet Information Services (IIS) 6, 7 and 7.5, WebMatrix, Visual Studio 2010, Windows Azure<br />
Support for Mozilla Firefox, Internet Explorer, Google Chrome. Firefox users have spell check features.<br />
<br />
<br />
<br />
<b><span style="color: red;">DotNetNuke</span></b><br />
<br />
DotNetNuke is a web content management system based on Microsoft .NET. The Community Edition is open source.<br />
DotNetNuke was written in VB.NET, though the developer has shifted to C# since version 6.0. It is distributed under both a Community Edition MIT license and commercial proprietary licenses as the Professional and Enterprise Editions.<br />
<br />
<span style="color: #38761d;"><b>DotNetNuke Community Edition</b></span><br />
<br />
The DotNetNuke content management system is intended to allow management of websites without much technical language, and to be extensible through a large number of third-party apps to provide functionality not included in the DotNetNuke core modules.<br />
Skins can be used to change the look of a website using DotNetNuke.<br />
The DotNetNuke Corporation is the steward of the DotNetNuke open source project. The open source version of DotNetNuke is called the Community Edition and is available as a free download. The Community Edition includes access to the source code of the framework and standard installation modules, and an MIT license allowing modification and distribution rights. The Community Edition is a popular web content management (WCM) system and application development framework for ASP.NET, with over 6,000,000 downloads and 600,000 production web sites as of October 2010. The most recent version of the Community Edition (7.0.0) was published in January 2013.<br />
<br />
website :<span style="color: blue;"> http://www.dotnetnuke.com/</span><br />
<br />
<span style="color: #38761d;"><b>Modules</b></span><br />
<br />
The default functionality of DotNetNuke can be expanded by adding third-party modules, either from an existing library of modules, or through in-house development of custom functionality. The DotNetNuke framework provides basic functionality such as security, user administration and content management, while modules are used to tailor the web site for specific deployment needs.<br />
A set of primary modules are included with the core DotNetNuke distribution. These modules provide the functionality required to create an e-commerce system, an intranet, a public web site or a custom web application. They are maintained by a volunteer team community on the DotNetNuke Community Forge.<br />
<br />
A module can be uploaded and automatically installed on a DotNetNuke installation through the administration pages of DotNetNuke. Once a module is added by the administrator, it can be placed on any of the pages in the web site and custom access permissions can be configured for it.<br />
<br />
<span style="color: #38761d;"><b>Skins</b></span><br />
<br />
A skinning architecture provides a separation between design and content, enabling a web designer to develop skins without requiring any specialist knowledge of development in ASP.NET: only knowledge of HTML and an understanding of how to prepare and package the skins themselves is required. Skins consist of basic HTML files with placeholders (tokens) for content, menus and other functionality, along with support files such as images, style sheets and JavaScript, packaged in a ZIP file.[citation needed]<br />
Upon Microsoft's release of the .NET Framework version 2, Microsoft had included functionality known as master pages. The principal idea behind master pages was to encourage code recycling and consistent design and aesthetics throughout a site by creating a master page with placeholders, which at runtime would be compiled and replaced by content.<br />
<br />
<br />
<br />
<br />
<br />
<span style="color: red;"><b>Umbraco</b></span><br />
<br />
<br />
Umbraco is an open source content management system (CMS) platform for publishing content on the World Wide Web and intranets. It is written in C# and deployed on Microsoft based infrastructure. The open source backend is released under an MIT License while the UI is released under the Umbraco license.<br />
Umbraco was developed by Niels Hartvig in 2000 and released as open source software in 2004.[4] In 2009, CMS Wire described it as one of the leading .NET-based open source CMS systems. In 2010, with 1000 downloads a day, Umbraco was in the Top 5 most popular downloads via the Microsoft Web Platform Installer, two places below its main rival DotNetNuke and was the 12th most downloaded application from Codeplex, six places below DotNetNuke and 13 places higher than mojoPortal.<br />
<br />
<br />
<span style="color: #38761d;"><b>Releases</b></span><br />
Version 4.1 Beta II was released on 16 February 2010 which refactors a number of key components of the framework,[7] including the UI tree control to improve performance and the user experience and parts of the data access layer to reduce the number of database calls.<br />
Version 5 (codenamed "Jupiter") is a rewrite of the framework, built using ASP.NET MVC,[15] published in January 2012. Problems (performance and code complexity) inherent in the architecture of the new Version 5 data access layer led to Version 5 being dropped in June 2012 despite having been released on a commercial licence, and development efforts refocused on integrating selected Version 5 front end enhancements into Version 4.<br />
<br />
<br />
<span style="color: red;"><b>mojoPortal</b></span><br />
<br />
<br />
mojoPortal is an open source, cross-platform, content management system (CMS) for ASP.NET which is written in the C# programming language. The CMS supports plugins and has built-in support for, among others, forums, blogs, event calendars, photo galleries, and an e-commerce feature.The project was awarded an Open Source Content Management System Award by Packt in 2007 saying that the "ease of use, set of relevant tools and plugins and also the fact that it is cross platform, made it stand out above the rest".<br />
<br />
<span style="color: lime;"><b>Awards</b></span><br />
<br />
Best Non-PHP Open Source Content Management System in the 2007 CMS Awards by Packt Publishing[4]<br />
3rd place in the 2009 CMS Awards by Packt Publishing, in the Non-PHP category<br />
<br />
<br />
<br />
<span style="color: lime;"><b>Key features</b></span><br />
<br />
Cross-platform - Runs under Windows/IIS or Mono/Apache with most GNU/Linux distributions or Mac OS X<br />
Works with MS SQL Server, SqlAzure, MySQL, PostgreSQL, Firebird Sql, and SQLite databases<br />
Supports multiple sites on one installation and database<br />
XHTML or HTML 5 compliant Content Management with support for work flow and approval/publishing process<br />
Custom Skinning with support for user selectable skins and individual skins per page<br />
Supports TinyMCE, FCKeditor, CKeditor or XStandard HTML WYSIWYG<br />
Easily Customizable User Profile System<br />
Member List<br />
Bread Crumbs<br />
Flexible Menu system<br />
Localizable, currently translated into 10 languages<br />
Passwords encryption<br />
SSL support for the whole website or per page<br />
URL re-writing<br />
Error logging and optional debug logging<br />
Authenticate against the database, LDAP, Active Directory, Windows NTLM, OpenID, or Windows Live ID<br />
Content Workflow<br />
Content Versioning<br />
Content Template System<br />
Content Style Template System<br />
Content Widgets<br />
Built in SEO (Search Engine Optimization)<br />
301 Redirect Manager<br />
Integrated Google Analytics<br />
Support for Artisteer templates<br />
<br />
<br />
<b><span style="color: red;">Orchard</span></b><br />
<br />
Orchard is a free, open source, community-focused content management system written in ASP.NET platform using the ASP.NET MVC framework. Its vision is to create shared components for building ASP.NET applications and extensions, and specific applications that leverage these components to meet the needs of end-users, scripters, and developers.<br />
Orchard is delivered as part of the ASP.NET Open Source Gallery under the OuterCurve Foundation. It is licensed under a New BSD license, which is approved by the Open Source Initiative (OSI).<br />
As per Orchard's codeplex page, the intended output of the Orchard project is three-fold:<br />
Individual .NET-based applications that appeal to end-users, scripters, and developers<br />
A set of re-usable components that makes it easy to build such applications<br />
A vibrant community to help define these applications and extensions</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com1tag:blogger.com,1999:blog-4493856116928207359.post-17726694334187823452013-04-08T04:52:00.000-07:002013-04-08T04:52:18.825-07:00301 redirect HTTPS to HTTP on Apache server<span style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;">Redirecting </span><b style="background-color: white; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;">https</b><span style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;"> to </span><strong style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;">http</strong><span style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;"> site-wide using the </span><strong style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;">.htaccess</strong><span style="background-color: white; color: #333333; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;"> file would be done through:</span><br />
<br />
<span style="color: #990000;"><br /></span>
<br />
<div style="background-color: white; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;">
<span style="color: #666666;">Options +FollowSymlinks<br />RewriteEngine on<br />RewriteBase /</span></div>
<div style="background-color: white; font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;">
<span style="color: #666666;">RewriteCond %{SERVER_PORT} ^<strong>443</strong>$ [OR]</span></div>
<div style="font-family: 'Lucida Grande', 'Lucida Sans', Verdana, Arial, sans-serif; font-size: 13px; line-height: 19px;">
<div style="background-color: white;">
<span style="color: #666666;">RewriteCond %{<b>HTTPS</b>} =on<br />RewriteRule ^(.*)$ <a href="http://example.com/" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); background-repeat: repeat no-repeat; font-weight: bold; padding: 2px;"></a><a href="http://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); font-weight: bold; padding: 2px;">http://yousitename.com</a>/$1 [R=301,L]</span></div>
<div style="background-color: white;">
<span style="color: #666666;"><br /></span>
<span style="color: #666666;"><br /></span>
<span style="color: #333333;">One way is as in this example:</span></div>
<div style="background-color: white;">
<span style="color: #666666;"><br /></span>
</div>
<br />
<div style="background-color: white;">
<span style="color: #666666;">RewriteEngine on</span></div>
<div style="background-color: white;">
<span style="color: #666666;">#this page has to be on https<br />RewriteCond %{SERVER_PORT} !^443$<br />RewriteCond %{HTTPS} !on<br />RewriteCond %{REQUEST_URI} ^/secure-page1.php$ [NC]<br />RewriteRule ^(.*)$ <a href="https://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); background-repeat: repeat no-repeat; font-weight: bold; padding: 2px;">https://</a></span><a href="http://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); font-weight: bold; padding: 2px;">yousitename</a><span style="color: #666666;"><a href="https://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); background-repeat: repeat no-repeat; font-weight: bold; padding: 2px;">.com/$1</a> [L,R=301]</span></div>
<div style="background-color: white;">
<span style="color: #666666;"><br />#this page has to be on https<br />RewriteCond %{SERVER_PORT} !^443$<br />RewriteCond %{HTTPS} !on<br />RewriteCond %{REQUEST_URI} ^/secure-page2.php$ [NC]<br />RewriteRule ^(.*)$ <a href="https://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); background-repeat: repeat no-repeat; font-weight: bold; padding: 2px;">https://example.com/$1</a> [L,R=301]</span></div>
<div style="background-color: white;">
</div>
<div>
<div style="background-color: white;">
<span style="color: #666666;"><br />#all other pages have to be on http<br />RewriteCond %{SERVER_PORT} ^443$ [OR]<br />RewriteCond %{HTTPS} on<br />RewriteCond %{REQUEST_URI} !^/secure-page1.php$ [NC]<br />RewriteCond %{REQUEST_URI} !^/secure-page2.php$ [NC]<br />RewriteRule ^(.*)$ <a href="http://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); background-repeat: repeat no-repeat; font-weight: bold; padding: 2px;">http://</a></span><a href="http://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); font-weight: bold; padding: 2px;">yousitename</a><span style="color: #666666;"><a href="http://example.com/$1" rel="nofollow" style="background-image: url(https://ssl.gstatic.com/sites/p/229b45/system/app/themes/solitudespice/bg_link.gif); background-repeat: repeat no-repeat; font-weight: bold; padding: 2px;">.com/$1</a> [L,R=301]</span></div>
<div style="background-color: white;">
<span style="color: #666666;"><br /></span></div>
<br />
<div style="background-color: white; color: #333333;">
So assuming you have a good reason to want some urls as <b style="color: black;">https</b> AND have them indexed, then you can add php scripting to each page and determine whether it has to be <strong>http</strong> or <b style="color: black;">https</b>.</div>
<div style="background-color: white; color: #333333;">
To permit the use of php on pages suffixed as .html you need to add an Apache handler in the <strong>.htaccess</strong> file:</div>
<div style="background-color: white; color: #333333;">
<br /></div>
<br />
<div style="background-color: white; color: #333333;">
<span style="color: #990000;"># parsing html as php<br /><strong>AddHandler application/x-httpd-php .html </strong><br /><span style="color: black;">NB: The above directiove can vary greatly depending on the rexact server configuration. It can be any of the below directives (or none for that matter):</span><br /><strong>Addhandler application/x+https-php5 .html</strong></span></div>
<div style="background-color: white; color: #333333;">
<span style="color: black;">or</span></div>
<div style="background-color: white; color: #333333;">
<span style="color: #990000;"><strong>AddType application/x-httpd-php5 .html</strong></span></div>
<div style="background-color: white; color: #333333;">
<span style="color: black;">or another combination like that. It's bewildering how many different Apache server configuraiotns the can be and how much basic directievs can differ. The trouble is if yuo use the wrong one, you get a 500 error. So it ends up being trial and error all the way.</span></div>
<div style="background-color: white; color: #333333;">
<span style="color: black;"><br /></span></div>
<div style="background-color: white; color: #333333;">
php script to be added at the top of every page where you need to 301 redirect from <b style="color: black;">https</b> to http, before any other line of source code would be: </div>
<div style="background-color: white; color: #333333;">
<br /></div>
<div style="background-color: white; color: #333333;">
<br /></div>
<br />
<span style="background-color: white; color: #741b47;"><?php<br />if ( $_SERVER['<b>HTTPS</b>'] )<br /> {<br /> $host = $_SERVER['HTTP_HOST'];<br /> $request_uri = $_SERVER['REQUEST_URI'];<br /> $good_url = "http://" . $host . $request_uri; </span><br />
<span style="background-color: white; color: #741b47;"> header( "HTTP/1.1 301 Moved Permanently" );<br /> header( "Location: $good_url" );<br /> exit;<br /> }<br />?> </span><br />
<br />
<br />
</div>
<br />
<div style="background-color: white;">
</div>
</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-21594933424598647792013-04-08T02:53:00.001-07:002013-04-08T02:53:29.903-07:00Facebook-style tooltip plugin for jQuery<br />
<br />
<br />
<br />
Tipsy is a jQuery plugin for creating a Facebook-like tooltips effect based on an anchor tag's title attribute.<br />
<br />
Examples & Usage<br />
Basic<br />
By default, tooltips will appear centred underneath their anchor:<br />
<br />
Hover over me<br />
<br />
Basic example:<br />
$('#example-1').tipsy();<br />
Gravities<br />
Using the gravity parameter, it's possible to control the positioning of the tooltip relative to the pointee:<br />
<br />
Northwest<span class="Apple-tab-span" style="white-space: pre;"> </span>North<span class="Apple-tab-span" style="white-space: pre;"> </span>Northeast<br />
West<span class="Apple-tab-span" style="white-space: pre;"> </span> <span class="Apple-tab-span" style="white-space: pre;"> </span>East<br />
Southwest<span class="Apple-tab-span" style="white-space: pre;"> </span>South<span class="Apple-tab-span" style="white-space: pre;"> </span>Southeast<br />
Gravity example:<br />
$('#foo').tipsy({gravity: 'n'}); // nw | n | ne | w | e | sw | s | se<br />
As of version 0.1.3, it's possible to use a callback function to set the gravity dynamically at hover-time. Within the callback, this refers to the active element, and the function should return the calculated gravity as a string. Two demo callbacks are supplied - $.fn.tipsy.autoNS and $.fn.tipsy.autoWE - which select north/south and west/east gravity, respectively, based on the element's location in the viewport.<br />
<br />
Here's an example (scroll the page to see the effect):<br />
<br />
Dynamic Gravity<br />
Dynamic gravity example:<br />
$('#foo').tipsy({gravity: $.fn.tipsy.autoNS});<br />
Fading<br />
For full Wob2.0 compliance, you must fade these badboys in:<br />
<br />
Hover over me<br />
<br />
Fade example:<br />
$('#example-fade').tipsy({fade: true});<br />
Bonus Feature<br />
You can EVEN COMBINE FADE AND GRAVITY! (exercise for reader)<br />
<br />
Slightly Advanced Usage<br />
Tooltip text can be set based on any attribute, not just title:<br />
<br />
Hover over me<br />
<br />
Custom attribute example:<br />
$('#example-custom-attribute').tipsy({title: 'id'});<br />
If any attribute isn't good enough, you may pass a callback function instead. It should return the tooltip text for this element:<br />
<br />
Hover over me<br />
<br />
Callback example:<br />
$('#example-callback').tipsy({title: function() { return this.getAttribute('original-title').toUpperCase(); } });<br />
Finally, it is possible to specify a fallback tooltip for any element which does not have any tooltip text:<br />
<br />
Hover over me<br />
<br />
Fallback example:<br />
$('#example-fallback').tipsy({fallback: "Where's my tooltip yo'?" });<br />
If your tooltip content contains HTML, set the html option to true (relies on invalid HTML, sorry):<br />
<br />
Hover over me<br />
<br />
HTML example:<br />
$('#example-html').tipsy({html: true });<br />
Show/Hide Delay<br />
Delay example:<br />
$('#example-delay').tipsy({delayIn: 500, delayOut: 1000});<br />
Hover and wait<br />
<br />
Dynamically Updating Text<br />
Tipsy tooltips are 'live' - if the source attribute's value changes, the tooltip text will be updated the next time the tooltip is shown. There's one caveat - if you wish to remove the tooltip by setting the title attribute to an empty string, set the original-title attribute instead (this only applies if you're using the title attribute).<br />
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8AGD30ViSwiJEYLf8KeHl7vyQTGDAR23aUU9uSnA34pDBWSq9bLstuQi3VnNx8ZMhz-el4wb7iCYTfuQymEEZ9dG8kjDpl_8LETrRsoSFsXXUOiq50R_uSbNaaMsdNmHC3JWSTXxdYoJ/s1600/just+image.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiE8AGD30ViSwiJEYLf8KeHl7vyQTGDAR23aUU9uSnA34pDBWSq9bLstuQi3VnNx8ZMhz-el4wb7iCYTfuQymEEZ9dG8kjDpl_8LETrRsoSFsXXUOiq50R_uSbNaaMsdNmHC3JWSTXxdYoJ/s1600/just+image.JPG" height="93" width="320" /></a></div>
<br />
Form input tooltips code:<br />
<script type='text/javascript'><br />
$(function() {<br />
$('#focus-example [title]').tipsy({trigger: 'focus', gravity: 'w'});<br />
});<br />
</script><br />
Manually Triggering a Tooltip<br />
It's possible to disable hover events and instead trigger tooltips manually:<br />
<br />
Manual triggering example:<br />
My tooltip is manually triggered | Show it | Hide it<br />
Code for manual triggering:<br />
<p id='manual-example'><br />
<a rel='tipsy' title='Well hello there'>My tooltip is manually triggered</a><br />
<a href='#' onclick='$("#manual-example a[rel=tipsy]").tipsy("show"); return false;'>Show</a><br />
<a href='#' onclick='$("#manual-example a[rel=tipsy]").tipsy("hide"); return false;'>Hide</a><br />
</p><br />
<br />
<script type='text/javascript'><br />
$('#manual-example a[rel=tipsy]').tipsy({trigger: 'manual'});<br />
</script><br />
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com2tag:blogger.com,1999:blog-4493856116928207359.post-5667886799961650472013-02-15T02:50:00.000-08:002013-02-15T02:50:43.462-08:00multiple file attachment in php script and sending mail<br />
<html><br />
<head><br />
<title>GLobal web solution Tutorial</title><br />
</head><br />
<body><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><form action="php_sendmail_multiple_upload2.php" method="post" name="form1" enctype="multipart/form-data"><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><table width="343" border="1"><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td>To</td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td><input name="txtTo" type="text" id="txtTo"></td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td>Subject</td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td><input name="txtSubject" type="text" id="txtSubject"></td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td>Description</td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td><textarea name="txtDescription" cols="30" rows="4" id="txtDescription"></textarea></td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td>Form Name</td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td><input name="txtFormName" type="text"></td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td>Form Email</td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td><input name="txtFormEmail" type="text"></td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> <td>Attachment</td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> <td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><input name="fileAttach[]" type="file"><br><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><input name="fileAttach[]" type="file"><br><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><input name="fileAttach[]" type="file"><br><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><input name="fileAttach[]" type="file"><br><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><input name="fileAttach[]" type="file"><br><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><input name="fileAttach[]" type="file"><br><span class="Apple-tab-span" style="white-space: pre;"> </span> <br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> </td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td>&nbsp;</td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><td><input type="submit" name="Submit" value="Send"></td><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></tr><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></table><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span></form><br />
</body><br />
</html><br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<html><br />
<head><br />
<br />
</head><br />
<body><br />
<?<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strTo = $_POST["txtTo"];<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strSubject = $_POST["txtSubject"];<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strMessage = nl2br($_POST["txtDescription"]);<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//*** Uniqid Session ***//<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strSid = md5(uniqid(time()));<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader = "";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "From: ".$_POST["txtFormName"]."<".$_POST["txtFormEmail"].">\nReply-To: ".$_POST["txtFormEmail"]."";<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "MIME-Version: 1.0\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "Content-Type: multipart/mixed; boundary=\"".$strSid."\"\n\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "This is a multi-part message in MIME format.\n";<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "--".$strSid."\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "Content-type: text/html; charset=utf-8\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "Content-Transfer-Encoding: 7bit\n\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= $strMessage."\n\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//*** Attachment ***//<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for($i=0;$i<count($_FILES["fileAttach"]["name"]);$i++)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($_FILES["fileAttach"]["name"][$i] != "")<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strFilesName = $_FILES["fileAttach"]["name"][$i];<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strContent = chunk_split(base64_encode(file_get_contents($_FILES["fileAttach"]["tmp_name"][$i])));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "--".$strSid."\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "Content-Type: application/octet-stream; name=\"".$strFilesName."\"\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "Content-Transfer-Encoding: base64\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= "Content-Disposition: attachment; filename=\"".$strFilesName."\"\n\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$strHeader .= $strContent."\n\n";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$flgSend = @mail($strTo,$strSubject,null,$strHeader); // @ = No Show Error //<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($flgSend)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "Mail send completed.";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>echo "Cannot send mail.";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
?><br />
</body><br />
</html><br />
<br />
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com1tag:blogger.com,1999:blog-4493856116928207359.post-63440247481036805212013-01-24T02:06:00.000-08:002013-01-24T02:06:04.344-08:00PHP MAIL() FUNCTION NOT WORKING IN WINDOWS SERVER<span style="background-color: white; font-family: Arial; font-size: 14px; line-height: 20px;">When your mail goes to anyone who uses a Windows mail server (comcast, gmail, and maybe aol), the recipients won’t get it.</span><br />
<span style="background-color: white; font-family: Arial; font-size: 14px; line-height: 20px;"><br /></span>
<span style="background-color: white; font-family: Arial; font-size: 14px; line-height: 20px;">To test if mail() function exist in your server you can try this few lines of codes.</span><br />
<span style="background-color: white; font-family: Arial; font-size: 14px; line-height: 20px;"><br /></span>
<br />
<div class="crayon-line" id="crayon-510103f54145b-1" style="background-color: #fdfdfd; background-image: none; border: none; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><?php</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54145b-2" style="background-color: rgb(247, 247, 247) !important; border: 1px rgb(204, 204, 204) !important; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="st" style="background-color: transparent; border: 0px; color: rgb(128, 0, 128) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">if</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">(</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="e" style="background-color: transparent; border: 0px; color: rgb(0, 78, 208) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">function_exists</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">(</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s" style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">'mail'</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">)</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">)</span></div>
<div class="crayon-line" id="crayon-510103f54145b-3" style="background-color: #fdfdfd; background-image: none; border: none; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="k " style="background-color: transparent; border: 0px; color: rgb(128, 0, 128) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">echo</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s" style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">'mail() is enable'</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54145b-4" style="background-color: rgb(247, 247, 247) !important; border: 1px rgb(204, 204, 204) !important; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="st" style="background-color: transparent; border: 0px; color: rgb(128, 0, 128) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">else</span></div>
<div class="crayon-line" id="crayon-510103f54145b-5" style="background-color: #fdfdfd; background-image: none; border: none; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="k " style="background-color: transparent; border: 0px; color: rgb(128, 0, 128) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">echo</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s" style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">'mail() has been disabled'</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54145b-6" style="background-color: rgb(247, 247, 247) !important; border: 1px rgb(204, 204, 204) !important; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">?></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54145b-6" style="background-color: rgb(247, 247, 247) !important; border: 1px rgb(204, 204, 204) !important; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><br /></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54145b-6" style="background-color: rgb(247, 247, 247) !important; border: 1px rgb(204, 204, 204) !important; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><span style="background-color: white; color: black; font-family: Arial; font-size: 14px; line-height: 20px; white-space: normal;">If the result above is false/mail is disabled then maybe you need to add the solution I’ve provided below or else of course your mail() code does not formatted correctly</span></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54145b-6" style="background-color: rgb(247, 247, 247) !important; border: 1px rgb(204, 204, 204) !important; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<span style="background-color: white; font-family: Arial; font-size: 14px; line-height: 20px; white-space: normal;"><br /></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54145b-6" style="background-color: rgb(247, 247, 247) !important; border: 1px rgb(204, 204, 204) !important; font-family: monospace; font-size: 13px; line-height: 16.25px; margin: 0px; padding: 0px 5px; vertical-align: baseline; white-space: pre;">
<h3 class="headline" style="background-color: white; border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-width: 0px 0px 1px; font-family: Georgia; font-size: 20px; font-weight: normal; line-height: normal; margin: 10px 0px 0px; padding: 7px 0px 5px; vertical-align: baseline; white-space: normal;">
First Steps:</h3>
<div>
<br /></div>
<div>
<div class="crayon-line" id="crayon-510103f54185b-1" style="background-color: #fdfdfd; background-image: none; border: none; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><?php</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54185b-2" style="border: 1px rgb(204, 204, 204) !important; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="c" style="background-color: transparent; border: 0px; color: rgb(255, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">// Add this code before mail() function.</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54185b-2" style="border: 1px rgb(204, 204, 204) !important; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="c" style="background-color: transparent; border: 0px; color: rgb(255, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><pre class="csharpcode" style="background-color: whitesmoke; border-bottom-left-radius: 4px; border-bottom-right-radius: 4px; border-top-left-radius: 4px; border-top-right-radius: 4px; border: 1px solid rgba(0, 0, 0, 0.14902); color: #333333; font-family: Monaco, Menlo, Consolas, 'Courier New', monospace; line-height: 20px; margin-bottom: 10px; padding: 9.5px; white-space: pre-wrap; word-break: break-all; word-wrap: break-word;"><span style="color: grey;"> ini_set</span>(<span class="str" style="color: #006080;">'SMTP'</span>,<span class="str" style="color: #006080;">'localhost'</span>); </pre>
</span></div>
<div class="crayon-line" id="crayon-510103f54185b-3" style="background-color: #fdfdfd; background-image: none; border: none; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="e" style="background-color: transparent; border: 0px; color: rgb(0, 78, 208) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">ini_set</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">(</span><span class="s" style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">"sendmail_from"</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">,</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s" style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">"info@<span style="background-color: #f7f7f7;">example</span>.com"</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">)</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">;</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54185b-4" style="border: 1px rgb(204, 204, 204) !important; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">?></span></div>
</div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54185b-4" style="border: 1px rgb(204, 204, 204) !important; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><h3 class="headline" style="background-color: white; border-bottom-color: rgb(230, 230, 230); border-bottom-style: solid; border-width: 0px 0px 1px; color: black; font-family: Georgia; font-size: 20px; font-weight: normal; line-height: normal; margin: 10px 0px 0px; padding: 7px 0px 5px; vertical-align: baseline; white-space: normal;">
Second Steps:</h3>
<div>
<br /></div>
<div>
<span style="background-color: white; color: black; font-family: Arial; font-size: 14px; line-height: 20px; white-space: normal;">If first steps doesn’t work for you then you need to look a bit in your code header area.</span></div>
<div>
<div class="crayon-line" id="crayon-510103f541c44-1" style="background-color: #fdfdfd; background-image: none; border: none; color: black; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
From</div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f541c44-2" style="border: 1px rgb(204, 204, 204) !important; color: black; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">$</span>headers<span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">.</span><span class="o" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">=</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s " style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">'From: Name <address@example.com>'</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">.</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s " style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">"\r\n"</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">;</span></div>
<div class="crayon-line" id="crayon-510103f541c44-3" style="background-color: #fdfdfd; background-image: none; border: none; color: black; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
To</div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f541c44-4" style="border: 1px rgb(204, 204, 204) !important; color: black; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">$</span>headers<span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">.</span><span class="o" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">=</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s " style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">'From: address@example.com'</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">.</span><span class="h" style="background-color: transparent; border: 0px; color: rgb(0, 111, 224) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"> </span><span class="s " style="background-color: transparent; border: 0px; color: rgb(0, 128, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">"\r\n"</span><span class="sy" style="background-color: transparent; border: 0px; color: rgb(51, 51, 51) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;">;</span></div>
</div>
</span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54185b-4" style="border: 1px rgb(204, 204, 204) !important; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><br /></span></div>
<div class="crayon-line crayon-striped-line" id="crayon-510103f54185b-4" style="border: 1px rgb(204, 204, 204) !important; margin: 0px; padding: 0px 5px; vertical-align: baseline;">
<span class="ta" style="background-color: transparent; border: 0px; color: rgb(255, 0, 0) !important; display: inline-block; font-family: inherit; font-size: inherit !important; line-height: inherit !important; margin: 0px; padding: 0px; vertical-align: baseline; zoom: 1;"><br /></span></div>
</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-87715230991172499312012-12-06T23:30:00.000-08:002015-08-18T04:18:44.756-07:00most popular add ons for oscommerce, useful osCommerce add-ons<br />
<br />
Here you will find a list of the most popular <span class="Bold">osCommerce modules</span><br />
<span class="Bold"><br /></span>
<span class="Bold"> When installing add-ons make sure you download them from known sources<br /> Always make backups before you start installing addons. Always! </span><br />
<br /><table border="0" cellpadding="2" cellspacing="0" style="width: 100%px;"><tbody>
<tr><td><ul>
<li><a href="http://addons.oscommerce.com/info/7632">Traducción al español oscommer v2.3.1</a></li>
<li><a href="http://addons.oscommerce.com/info/2823">Ultimate SEO URLs</a></li>
<li><a href="http://addons.oscommerce.com/info/500">Easy Populate & Products Attributes</a></li>
<li><a href="http://addons.oscommerce.com/info/4269">Discount Coupon Codes</a></li>
<li><a href="http://addons.oscommerce.com/info/1524">Simple Template System (STS)</a></li>
<li><a href="http://addons.oscommerce.com/info/7650">CKEditor osC 2.3.1</a></li>
<li><a href="http://addons.oscommerce.com/info/3617">Tutorial de Instalacion de osCommerce en español</a></li>
<li><a href="http://addons.oscommerce.com/info/355">Purchase Without Account</a></li>
<li><a href="http://addons.oscommerce.com/info/1435">Order Editor</a></li>
<li><a href="http://addons.oscommerce.com/info/5752">Security Pro</a></li>
<li><a href="http://addons.oscommerce.com/info/7700">Discount Code for osCommerce 2.3.1</a></li>
<li><a href="http://addons.oscommerce.com/info/7663">Theme Switcher</a></li>
<li><a href="http://addons.oscommerce.com/info/487">USPS Methods</a></li>
<li><a href="http://addons.oscommerce.com/info/7698">2.3 Template (Turquoise)</a></li>
<li><a href="http://addons.oscommerce.com/info/6044">ANTI Cross Site Scripting attac</a></li>
<li><a href="http://addons.oscommerce.com/info/5851">Header Tags SEO V 3.0</a></li>
<li><a href="http://addons.oscommerce.com/info/716">Separate Pricing Per Customer</a></li>
<li><a href="http://addons.oscommerce.com/info/2097">Register Globals</a></li>
<li><a href="http://addons.oscommerce.com/info/7834">Osc_Sec</a></li>
<li><a href="http://addons.oscommerce.com/info/2679">osCommerce PayPal IPN Module v1.0 For 2.2MS2</a></li>
<li><a href="http://addons.oscommerce.com/info/4513">Google Base / Froogle Data Feeder v1.00</a></li>
<li><a href="http://addons.oscommerce.com/info/4441">SiteMonitor</a></li>
<li><a href="http://addons.oscommerce.com/info/4063">AJAX Attribute Manager</a></li>
<li><a href="http://addons.oscommerce.com/info/282">Credit Class & Gift Voucher</a></li>
<li><a href="http://addons.oscommerce.com/info/6646">One Page Checkout</a></li>
<li><a href="http://addons.oscommerce.com/info/4228">"Dynamenu" for osCommerce - Dynamic Fly-Out, Drop-Down, Tree Category Menu</a></li>
<li><a href="http://addons.oscommerce.com/info/5914">Secure your site with an IP trap</a></li>
<li><a href="http://addons.oscommerce.com/info/7718">italiano</a></li>
<li><a href="http://addons.oscommerce.com/info/7778">osCommerce Orange Headers & Buttons jQuery Theme</a></li>
<li><a href="http://addons.oscommerce.com/info/7626">Modular Front Page</a></li>
</ul>
</td><td><ol start="16">
<li><br /></li>
</ol>
</td></tr>
</tbody></table>
<br />
<a target="_blank" href="http://www.amazon.in/b?_encoding=UTF8&camp=3626&creative=24790&linkCode=ur2&node=1983396031&site-redirect=&tag=gwebsolutionb-21">Shoes</a><img src="http://ir-in.amazon-adsystem.com/e/ir?t=gwebsolutionb-21&l=ur2&o=31" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com1tag:blogger.com,1999:blog-4493856116928207359.post-5960085592581446372012-12-06T21:24:00.000-08:002012-12-06T21:24:21.608-08:00what's new in php 5.4 and php 5.4 here<br />
<div class="section" id="migration54.new-features">
<h2 class="title">
New features</h2>
<div class="simpara">
PHP 5.4.0 offers a wide range of new features:
</div>
<ul class="itemizedlist">
<li class="listitem">
<span class="simpara">
Support for <a class="link" href="http://php.net/manual/en/language.oop5.traits.php">traits</a> has been added.
</span>
</li>
<li class="listitem">
<span class="simpara">
Short array syntax has been added, e.g. <em>$a = [1, 2, 3, 4];</em> or
<em>$a = ['one' => 1, 'two' => 2, 'three' => 3, 'four' => 4];</em>.
</span>
</li>
<li class="listitem">
<span class="simpara">
Function array dereferencing has been added, e.g. <em>foo()[0]</em>.
</span>
</li>
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/functions.anonymous.php">Closures</a> now support <em>$this</em>.
</span>
</li>
<li class="listitem">
<span class="simpara">
<em><?=</em> is now always available, regardless of the
<a class="link" href="http://php.net/manual/en/ini.core.php#ini.short-open-tag">short_open_tag</a> <var class="filename">php.ini</var> option.
</span>
</li>
<li class="listitem">
<span class="simpara">
Class member access on instantiation has been added,
e.g. <em>(new Foo)->bar()</em>.
</span>
</li>
<li class="listitem">
<span class="simpara">
<em>Class::{expr}()</em> syntax is now supported.
</span>
</li>
<li class="listitem">
<span class="simpara">
Binary number format has been added, e.g. <em>0b001001101</em>.
</span>
</li>
<li class="listitem">
<span class="simpara">
Improved parse error messages and improved incompatible arguments warnings.
</span>
</li>
<li class="listitem">
<span class="simpara">
The session extension can now track the <a class="link" href="http://php.net/manual/en/session.upload-progress.php">upload progress</a> of files.
</span>
</li>
<li class="listitem">
<span class="simpara">
Built-in development <a class="link" href="http://php.net/manual/en/features.commandline.webserver.php">web server in CLI mode</a>.</span> </li>
</ul>
<div>
<br /></div>
<div>
<h2 class="title">
Backward Incompatible Changes</h2>
<div class="simpara">
Although most existing PHP 5 code should work without changes, please take
note of some backward incompatible changes:
</div>
<ul class="itemizedlist">
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/features.safe-mode.php">Safe mode</a> is no
longer supported. Any applications that rely on safe mode may need
adjustment, in terms of security.
</span>
</li>
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/security.magicquotes.php">Magic quotes</a> has been removed. Applications relying
on this feature may need to be updated, to avoid security issues.
</span>
<span class="simpara">
<span class="function"><a class="function" href="http://php.net/manual/en/function.get-magic-quotes-gpc.php">get_magic_quotes_gpc()</a></span> and <span class="function"><a class="function" href="http://php.net/manual/en/function.get-magic-quotes-runtime.php">get_magic_quotes_runtime()</a></span>
now always return <strong><code>FALSE</code></strong>. <span class="function"><a class="function" href="http://php.net/manual/en/function.set-magic-quotes-runtime.php">set_magic_quotes_runtime()</a></span> raises an
<strong><code>E_CORE_ERROR</code></strong> level error.
</span>
</li>
<li class="listitem">
<span class="simpara">
The <a class="link" href="http://php.net/manual/en/ini.core.php#ini.register-globals">register_globals</a> and
<a class="link" href="http://php.net/manual/en/ini.core.php#ini.register-long-arrays">register_long_arrays</a> <var class="filename">php.ini</var> directives
have been removed.
</span>
</li>
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/language.references.pass.php">Call-time pass by reference</a> has been removed.
</span>
</li>
<li class="listitem">
<span class="simpara">
The <a class="link" href="http://php.net/manual/en/control-structures.break.php">break</a>
and <a class="link" href="http://php.net/manual/en/control-structures.continue.php">continue</a>
statements no longer accept variable arguments (e.g., <em>break 1 + foo() * $bar;</em>).
Static arguments still work, such as <em>break 2;</em>. As a side effect of this change
<em>break 0;</em> and <em>continue 0;</em> are no longer allowed.
</span>
</li>
<li class="listitem">
<span class="simpara">
In the <a class="link" href="http://php.net/manual/en/book.datetime.php">date and time extension</a>, the timezone can no longer be
set using the TZ environment variable. Instead you have to specify a timezone using the
<a class="link" href="http://php.net/manual/en/datetime.configuration.php#ini.date.timezone">date.timezone</a> <var class="filename">php.ini</var> option or <span class="function"><a class="function" href="http://php.net/manual/en/function.date-default-timezone-set.php">date_default_timezone_set()</a></span>
function. PHP will no longer attempt to guess the timezone, and will instead fall back to "UTC" and issue
a <strong><code>E_WARNING</code></strong>.
</span>
</li>
<li class="listitem">
<span class="simpara">
Non-numeric string offsets - e.g. <em>$a['foo']</em> where $a is a string - now return
false on <span class="function"><a class="function" href="http://php.net/manual/en/function.isset.php">isset()</a></span> and true on <span class="function"><a class="function" href="http://php.net/manual/en/function.empty.php">empty()</a></span>, and produce a <strong><code>E_WARNING</code></strong>
if you try to use them. Offsets of types double, bool and null produce a <strong><code>E_NOTICE</code></strong>. Numeric strings
(e.g. <em>$a['2']</em>) still work as before. Note that offsets like <em>'12.3'</em>
and <em>'5 foobar'</em> are considered non-numeric and produce a <strong><code>E_WARNING</code></strong>, but are converted
to 12 and 5 respectively, for backward compatibility reasons.
</span>
<span class="simpara">
Note: Following code returns different result.
</span>
<span class="simpara">
$str='abc';var_dump(isset($str['x'])); // false for PHP 5.4 or later, but true for 5.3 or less
</span>
</li>
<li class="listitem">
<span class="simpara">
Converting an array to a string will now generate an <strong><code>E_NOTICE</code></strong> level
error, but the result of the cast will still be the string <em>"Array"</em>.
</span>
</li>
<li class="listitem">
<span class="simpara">
Turning <strong><code>NULL</code></strong>, <strong><code>FALSE</code></strong>, or an empty string into an object by adding a property
will now emit an <strong><code>E_WARNING</code></strong> level error, instead of <strong><code>E_STRICT</code></strong>.
</span>
</li>
<li class="listitem">
<span class="simpara">
Parameter names that shadow super globals now cause a fatal error. This prohibits code like
<em>function foo($_GET, $_POST) {}</em>.
</span>
</li>
<li class="listitem">
<span class="simpara">
The Salsa10 and Salsa20 <a class="link" href="http://php.net/manual/en/book.hash.php">hash algorithms</a> have been removed.
</span>
</li>
<li class="listitem">
<span class="simpara">
<span class="function"><a class="function" href="http://php.net/manual/en/function.array-combine.php">array_combine()</a></span> now returns <em>array()</em> instead of <strong><code>FALSE</code></strong>
when two empty arrays are provided as parameters.
</span>
</li>
<li class="listitem">
<span class="simpara">
If you use <span class="function"><a class="function" href="http://php.net/manual/en/function.htmlentities.php">htmlentities()</a></span> with asian character sets, it
works like <span class="function"><a class="function" href="http://php.net/manual/en/function.htmlspecialchars.php">htmlspecialchars()</a></span> - this has always been the
case in previous versions of PHP, but now an <strong><code>E_STRICT</code></strong>
level error is emitted. </span></li>
<li class="listitem"><br /></li>
</ul>
<div class="section" id="migration54.deprecated">
<h2 class="title">
Deprecated features in PHP 5.4.x</h2>
<div class="simpara">
Deprecated functions:
</div>
<ul class="itemizedlist">
<li class="listitem"><span class="simpara">
<span class="function"><a class="function" href="http://php.net/manual/en/function.mcrypt-generic-end.php">mcrypt_generic_end()</a></span>
</span>
</li>
<li class="listitem"><span class="simpara">
<span class="function"><a class="function" href="http://php.net/manual/en/function.mysql-list-dbs.php">mysql_list_dbs()</a></span>
</span>
</li>
</ul>
<div>
<br /></div>
<div>
<h2 class="title">
Changed Functions</h2>
</div>
<div>
<div class="simpara">
OpenSSL:</div>
<ul class="itemizedlist">
<li class="listitem">
<span class="simpara">
Added a no padding option to the <span class="function"><a class="function" href="http://php.net/manual/en/function.openssl-encrypt.php">openssl_encrypt()</a></span> and <span class="function"><a class="function" href="http://php.net/manual/en/function.openssl-decrypt.php">openssl_decrypt()</a></span>
functions. </span>
</li>
</ul>
<div>
<div class="section" id="migration54.other">
<h2 class="title">
Other changes</h2>
<ul class="itemizedlist">
<li class="listitem">
<span class="simpara">
The default character set for <span class="function"><a class="function" href="http://php.net/manual/en/function.htmlspecialchars.php">htmlspecialchars()</a></span>
and <span class="function"><a class="function" href="http://php.net/manual/en/function.htmlentities.php">htmlentities()</a></span> is now <em>UTF-8</em>,
instead of <em>ISO-8859-1</em>. Note that changing your output
charset via the <a class="link" href="http://php.net/manual/en/ini.core.php#ini.default-charset">default_charset</a>
configuration setting does not affect htmlspecialchars/htmlentities unless
you are passing "" (an empty string) as the encoding parameter to your
<span class="function"><a class="function" href="http://php.net/manual/en/function.htmlspecialchars.php">htmlspecialchars()</a></span>/ <span class="function"><a class="function" href="http://php.net/manual/en/function.htmlentities.php">htmlentities()</a></span> calls.
Generally we do not recommend doing this because you should be able to
change your output charset without affecting the runtime charset used by
these functions. The safest approach is to explicitly set the charset on
each call to <span class="function"><a class="function" href="http://php.net/manual/en/function.htmlspecialchars.php">htmlspecialchars()</a></span> and
<span class="function"><a class="function" href="http://php.net/manual/en/function.htmlentities.php">htmlentities()</a></span>.
</span>
</li>
<li class="listitem">
<span class="simpara">
<strong><code>E_ALL</code></strong> now includes <strong><code>E_STRICT</code></strong> level
errors in the <a class="link" href="http://php.net/manual/en/errorfunc.configuration.php#ini.error-reporting">error_reporting</a> configuration directive.
</span>
</li>
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/book.snmp.php">SNMP</a> now has an OOP API.
</span>
<span class="simpara">
Functions now return <strong><code>FALSE</code></strong> on every error condition including SNMP-related
(no such instance, end of MIB, etc). Thus, in particular, breaks previous behavior
of get/walk functions returning an empty string on SNMP-related errors.
</span>
<span class="simpara">
Multi OID get/getnext/set queries are now supported.
</span>
<span class="simpara">
Dropped UCD-SNMP compatibility code, consider upgrading to net-snmp v5.3+, Net-SNMP v5.4+ is
required for Windows version.
</span>
<span class="simpara">
In sake of adding support for IPv6 DNS name resolution of
remote SNMP agent (peer) is done by extension now, not by Net-SNMP library anymore.
</span>
</li>
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/book.openssl.php">OpenSSL</a> now supports AES.
</span>
</li>
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/features.commandline.php">CLI SAPI</a> doesn't terminate any
more on fatal errors when using interactive mode with readline support.
</span>
</li>
<li class="listitem">
<span class="simpara">
<a class="link" href="http://php.net/manual/en/language.variables.superglobals.php">$_SERVER['REQUEST_TIME_FLOAT']</a>
has been added to include microsecond precision.
</span>
</li>
<li class="listitem">
<span class="simpara">
Added new hash algorithms: fnv132, fnv164, joaat
</span>
</li>
<li class="listitem">
<span class="simpara">
Chained string offsets - e.g. $a[0][0] where $a is a string - now work.
</span>
</li>
<li class="listitem">
<span class="simpara">
Arrays cast from <span class="type"><a class="type SimpleXMLElement" href="http://php.net/manual/en/class.simplexmlelement.php">SimpleXMLElement</a></span> now always contain all nodes instead of
just the first matching node. All <span class="type"><a class="type SimpleXMLElement" href="http://php.net/manual/en/class.simplexmlelement.php">SimpleXMLElement</a></span> children are now always
printed when using <span class="function"><a class="function" href="http://php.net/manual/en/function.var-dump.php">var_dump()</a></span>, <span class="function"><a class="function" href="http://php.net/manual/en/function.var-export.php">var_export()</a></span> and
<span class="function"><a class="function" href="http://php.net/manual/en/function.print-r.php">print_r()</a></span>.
</span>
</li>
<li class="listitem">
<span class="simpara">
It's now possible to enforce the class' <a class="link" href="http://php.net/manual/en/language.oop5.decon.php">__construct</a> arguments in an abstract
constructor in the base class. </span>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com2tag:blogger.com,1999:blog-4493856116928207359.post-11821316294757510572012-11-19T22:13:00.000-08:002012-12-02T20:58:02.130-08:00How to Schedule Database Backup Using Cron Job<br />
Many Web Applications are changing daily. In case your site is hacked or its data becomes corrupted, it is beneficial to have regularly stored backups of your databases so you can restore your account quickly. Luckily, there is a quick and reliable way to do this through the use of Cron Jobs. Below is a step by step process on how to set up Cron Jobs to take backups of your Databases.<br />
<br />
Change the following details to your database information and email information:<br />
$dbhost = “localhost“; // leave this as localhost for most sites<br />
$dbuser = “dbuser“; // enter your database username here<br />
$dbpass = “dbpass“; // enter your database password here<br />
$dbname = “dbname“; // enter the name of your database here<br />
$sendto = “Send To <sendto @email.com>“; // the email address you are sending to<br />
$sendfrom = “Send From <sendfrom @email.com>“; // This will be the reply to email address<br />
$sendsubject = “Daily Database Backup“; // the subject of the email<br />
$bodyofemail = “Here is the daily backup of my database.“; // The message included within the email<br />
<br />
$backupfile = $dbname . date("Y-m-d") . '.sql.gz';<br />
system("mysqldump -h $dbhost -u $dbuser --password=$dbpass $dbname | gzip > $backupfile");<br />
<div>
<br /></div>
<div>
<br /></div>
<div>
<div>
Save the file and upload to “www” directory to your cPanel account.</div>
<div>
<br /></div>
<div>
Log into your cPanel. Locate and click on “Cron Jobs”</div>
</div>
<div>
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcq3y2BdSbjoKwkEfmBjyX58ioFM3MZH8dKUUkhiyDWde6VNhXHnp7sTo9Vd8njer8BtVkrH7k9vwY93K9pE0vq8W9N3qAw8JbdCwimD0TA8MaEhIEUNfMcggYO3A3gbk_YwHe1_R9-GjO/s1600/Cron_Jobs1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgcq3y2BdSbjoKwkEfmBjyX58ioFM3MZH8dKUUkhiyDWde6VNhXHnp7sTo9Vd8njer8BtVkrH7k9vwY93K9pE0vq8W9N3qAw8JbdCwimD0TA8MaEhIEUNfMcggYO3A3gbk_YwHe1_R9-GjO/s1600/Cron_Jobs1.png" height="113" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Set the Cron Job to run at the desired time, (it is usually best to run this through the middle of the night,) then put the following command in the “Command:” box with your username in place of “cPanelusername”</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
php -q ~/cPanelusername/public_html/mtebackup/backup.php</div>
<div style="text-align: left;">
<br /></div>
<div style="text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0VkZPPmC4BFnqIB_M_DuopmD6rNH92Yer64KmLNexkpwx_vhuafUJX2-1ADxcXn-PN0bCG2P8lmynTwDa33cxcrEFDEVyPBwGisV6Hc3pS38ULmsAdI-zC8tMo0rooC9LLiUFfqNdYa6e/s1600/Cron_Jobs2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0VkZPPmC4BFnqIB_M_DuopmD6rNH92Yer64KmLNexkpwx_vhuafUJX2-1ADxcXn-PN0bCG2P8lmynTwDa33cxcrEFDEVyPBwGisV6Hc3pS38ULmsAdI-zC8tMo0rooC9LLiUFfqNdYa6e/s1600/Cron_Jobs2.png" height="148" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: left;">
Your backup Cron Job will now be listed in the “Current Cron Jobs” section.</div>
<div class="separator" style="clear: both; text-align: left;">
<br /></div>
<div class="separator" style="clear: both; text-align: left;">
Enjoy receiving daily backups of your database.</div>
<br />
<div style="text-align: left;">
<br /></div>
<br />
<div>
<br /></div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com1tag:blogger.com,1999:blog-4493856116928207359.post-26137236622378306352012-10-02T00:51:00.001-07:002012-10-02T00:51:29.937-07:00mail are delivered in the spam folder instead of inbox<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
How to Avoid Spam Filters with PHP mail() Emails<br />
<br />
Just about everyone who uses PHP has encountered the popular PHP mail() function which enables email to be sent from a server. This function is preferred to other methods of sending email, such as sending mail with SMTP Authentication, because its implementation is quick and easy. Unfortunately, when using the mail() function, your emails are more likely to be marked as spam. So how can we fix this?<br />
A Simple Implementation Example<br />
<br />
Many users of the mail() function often have simple implementations as shown in the code sample below:<br />
<br />
<?<br />
mail("recipient@recipient.com", "Message", "A simple message.", "From: The Sender <sender@sender.com>");<br />
?><br />
<br />
While this implementation will successfully send an email, the email will probably get caught in the recipient’s spam filter. Fortunately, there are some simple fixes that can help you avoid spam filters.<br />
4 Ways To Make Your PHP mail() Emails Less Spammy<br />
1. Use Headers<br />
<br />
In the simple example above, the from name and email address was added as the fourth parameter. Instead, consider using headers to set your From and Reply-To email addresses.<br />
<br />
<?<br />
$headers .= "Reply-To: The Sender <sender@sender.com>\r\n";<br />
$headers .= "Return-Path: The Sender <sender@sender.com>\r\n";<br />
$headers .= "From: The Sender <senter@sender.com>\r\n";<br />
?><br />
<br />
But headers are good for more than just setting details about the sender. They are also important for setting the content type, the email priority, and more. Here are how some additional headers look.<br />
<br />
<?<br />
$headers .= "Organization: Sender Organization\r\n";<br />
$headers .= "MIME-Version: 1.0\r\n";<br />
$headers .= "Content-type: text/plain; charset=iso-8859-1\r\n";<br />
$headers .= "X-Priority: 3\r\n";<br />
$headers .= "X-Mailer: PHP". phpversion() ."\r\n"<br />
?><br />
<br />
Be sure to replace the fourth parameter with the $headers variable as shown below.<br />
<br />
<?<br />
mail("recipient@recipient.com", "Message", "A simple message.", $headers);<br />
?><br />
2. The Message Sender Domain and Server Domain Should Match<br />
<br />
Spammers are notorious for sending emails from one server and trying to make the recipient believe that it came from somewhere else. So if you are sending an email from example@example.com, it is a good idea the the script reside on example.com.<br />
3. Be Sure to Properly Use the Content-type Attribute<br />
<br />
The Content-type attribute enables a message sender to say whether or not an email is plain text or html, or whether it has attachments. Obviously, the easiest to use content type is text/plain. You just add your text as shown in the simple example, and you are done. But when you use the other content types, additional pieces might be expected. For example, with the text/html content type, an html body tag is expected. Not having this tag could result in your email being marked as spam.<br />
4. Verify That Your Server Is Not Blacklisted<br />
<br />
When a server is blacklisted, it means that that server has identified as one that has been sending a lot of spam. This results in recipient mail servers rejecting or filtering any mail that is received from that server.<br />
<br />
So if your mail is not being received it is a good idea to verify that your server has not been blacklisted. This goes for both shared and dedicated servers. In a shared environment, it is common for other users on the server to be sending out spam. And in a dedicated environment, spammers may have found a way to exploit a vulnerability in a server or contact form to send out spam. So it is easy for either type of server to be blacklisted.<br />
<br />
<br />
<br />
Alright, now that you have the basics on avoiding spam filters, reconstruct your scripts and happy emailing!</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-49416922237225785552012-09-04T04:33:00.002-07:002012-09-04T04:33:50.043-07:00What is .htaccess? Its used<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
In order to specify your own customized error documents, you simply
need to add the following command, <em>on one line</em>, within your
htaccess file:<br />
<blockquote>
<strong>ErrorDocument code /directory/filename.ext</strong><br />
or<br />
<strong>ErrorDocument 404 /errors/notfound.html</strong><br />
This would cause any error code resulting in 404 to be forward to
yoursite.com/errors/notfound.html<br />
<br />
Likewise with:<br />
<strong>ErrorDocument 500 /errors/internalerror.html</strong>
</blockquote>
You can name the pages anything you want (I'd recommend something that
would prevent you from forgetting what the page is being used for), and
you can place the error pages anywhere you want within your site, so long
as they are web-accessible (through a URL). The initial slash in the
directory location represents the root directory of your site, that being
where your default page for your first-level domain is located. I
typically prefer to keep them in a separate directory for maintenance
purposes and in order to better control spiders indexing them through a
ROBOTS.TXT file, but it is entirely up to you.<br />
If you were to use an error document handler for each of the error
codes I mentioned, the htaccess file would look like the following (note
each command is on its own line):<br />
<blockquote>
<pre>ErrorDocument 400 /errors/badrequest.html
ErrorDocument 401 /errors/authreqd.html
ErrorDocument 403 /errors/forbid.html
ErrorDocument 404 /errors/notfound.html
ErrorDocument 500 /errors/serverr.html</pre>
</blockquote>
You can specify a full URL rather than a virtual URL in the
ErrorDocument string (http://yoursite.com/errors/notfound.html vs.
/errors/notfound.html). But this is not the preferred method by the
server's happiness standards.<br />
You can also specify HTML, believe it or not!<br />
<blockquote>
<pre>ErrorDocument 401 "<body bgcolor=#ffffff><h1>You have
to actually <b>BE</b> a <a href="#">member</A> to view
this page, Colonel!</pre>
</blockquote>
The only time I use that HTML option is if I am feeling particularly
saucy, since you can have so much more control over the error pages when
used in conjunction with xSSI or CGI or both. Also note that the
ErrorDocument starts with a " just before the HTML starts, but does not
end with one...it shouldn't end with one and if you do use that option,
keep it that way. And again, that should all be on one line, no naughty
word wrapping!<br />
<br />
<br />
<strong>For to password protect a directory and all the directories below.</strong><br />
Put a file named <strong>.htaccess</strong> in the directory you want to password protect with the follow text.<br /><br />
<br />
<pre>AuthUserFile /opt/guide/www.widexl.com/.htpasswd
AuthType Basic
AuthName "Member Page"
require valid-user
</pre>
<br />
<strong>For to password protect the admin.pl script.</strong><br />
You can use wildcards for this, like: "*.html" "*.zip"<br /><br />
<pre><files "admin.pl">
AuthUserFile /opt/guide/www.widexl.com/.htpasswd
AuthType Basic
AuthName "Administrator script"
require valid-user
</files>
</pre>
<br />
<strong>AuthUserFile</strong>: This is the full path to your <strong>password</strong> file<br />
<strong>AuthType</strong>: This need to be <strong>Basic</strong>.<br />
<strong>AuthName</strong>: This is the name (Realm) you want to give to your password protected site.<br />
<br /><br />
<a href="" name="auth_digest"></a><a href="http://www.widexl.com/tutorials/htaccess.html#top">top</a><br />
<strong>Auth Digest</strong><br /><br />
MD5 Digest authentication provides a more secure password system than
Basic authentication, but only works with supporting browsers.
The only major browsers which support digest authentication are Internet
Explorer 5.0, Amaya and Konqueror from KDE2.
I don't think its save for Big Brother, but it's always more save than
Auth Basic.
And most users are using Internet Explorer 5.0 or higher.
<br />
Module: <strong>mod_digest (old version)</strong><br />
Module: <strong>mod_auth_digest (new version)</strong><br />
OS: <strong>Unix, Linux, WinNT.</strong><br /><br />
Don't use both modules on the same time.<br /><br />
Setting up MD5 Digest authentication is easy.<br />
Put a file named <strong>.htaccess</strong> in the directory you want to password protect with the follow text.<br /><br />
Example: <strong>mod_digest</strong><br /><br />
<pre>AuthDigestFile /opt/guide/www.widexl.com/.htpasswd
AuthType Digest
AuthName "Member Page"
require valid-user
</pre>
<br />
Example: <strong>mod_auth_digest</strong><br /><br />
<pre>AuthDigestFile /opt/guide/www.widexl.com/.htpasswd
AuthType Digest
AuthName "Member Page"
AuthDigestDomain /member/ http://www.widexl.com/members/
AuthDigestNonceLifetime 300
require valid-user
</pre>
<pre>
</pre>
<pre>
</pre>
<pre><h4>
Enabling SSI Via htaccess</h4>
Many people want to use SSI, but don't seem to have the ability to do so
with their current web host. You can change that with htaccess. A note of
caution first...definitely ask permission from your host before you do
this, it can be considered 'hacking' or violation of your host's TOS, so
be safe rather than sorry:<br />
<blockquote>
<pre>AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes</pre>
</blockquote>
The first line tells the server that pages with a .shtml extension (for
Server parsed HTML) are valid. The second line adds a handler, the actual
SSI bit, in all files named .shtml. This tells the server that any file
named .shtml should be parsed for server side commands. The last line is
just techno-junk that you should throw in there.<br />
And that's it, you should have SSI enabled. But wait...don't feel like
renaming all of your pages to .shtml in order to take advantage of this
neat little toy? Me either! Just add this line to the fragment above,
between the first and second lines:<br />
<blockquote>
<pre>AddHandler server-parsed .html</pre>
</blockquote>
A note of caution on that one too, however. This will force the server
to parse every page named .html for SSI commands, even if they have no SSI
commands within them. If you are using SSI sparingly on your site, this is
going to give you more server drain than you can justify. SSI does slow
down a server because it does extra stuff before serving up a page,
although in human terms of speed, it is virtually transparent. Some people
also prefer to allow SSI in html pages so as to avoid letting anyone who
looks at the page extension to know that they are using SSI in order to
prevent the server being compromised through SSI hacks, which is possible.
Either way, you now have the knowledge to use it either way.<br />
If, however, you are going to keep SSI pages with the extension of
.shtml, and you want to use SSI on your Index pages, you need to add the
following line to your htaccess:<br />
<blockquote>
<pre>DirectoryIndex index.shtml index.html</pre>
</blockquote>
</pre>
<br />
</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-80950094816268714712012-09-04T04:17:00.002-07:002012-09-04T04:17:44.368-07:00jQuery - Selectors<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
The jQuery library harnesses the power of Cascading Style Sheets
(CSS) selectors to let us quickly and easily access elements or groups
of elements in the Document Object Model (DOM).<br />
A jQuery Selector is a function which makes use of expressions to
find out matching elements from a DOM based on the given criteria.<br />
<h1>
The $() factory function:</h1>
All type of selectors available in jQuery, always start with the dollar sign and parentheses: <b>$()</b>.<br />
The factory function <b>$()</b> makes use of following three building blocks while selecting elements in a given document:<br />
<table border="1" cellpadding="5" cellspacing="0" class="src" style="width: 100%px;">
<tbody>
<tr>
<th width="25%">jQuery</th><th width="75%">Description</th></tr>
<tr><td><b>Tag Name:</b></td><td>Represents a tag name available in the DOM. For example <b>$('p')</b> selects all paragraphs in the document.</td></tr>
<tr><td><b>Tag ID:</b></td><td>Represents a tag available with the given ID in the DOM. For example <b>$('#some-id')</b> selects the single element in the document that has an ID of some-id.</td></tr>
<tr><td><b>Tag Class:</b></td><td>Represents a tag available with the given class in the DOM. For example <b>$('.some-class')</b> selects all elements in the document that have a class of some-class.</td></tr>
</tbody></table>
All the above items can be used either on their own or in combination
with other selectors. All the jQuery selectors are based on the same
principle except some tweaking.<br />
<b>NOTE:</b> The factory function <b>$()</b> is a synonym of <b>jQuery()</b> function. So in case you are using any other JavaScript library where <b>$</b> sign is conflicting with some thing else then you can replace <b>$</b> sign by <b>jQuery</b> name and you can use function <b>jQuery()</b> instead of <b>$()</b>.<br />
<h2>
Example:</h2>
Following is a simple example which makes use of Tag Selector. This would select all the elements with a tag name <b>p</b>.<br />
<table cellpadding="5" cellspacing="5" class="src">
<tbody>
<tr><td><pre><html>
<head>
<title>the title</title>
<script type="text/javascript"
src="/jquery/jquery-1.3.2.min.js"></script>
<script type="text/javascript" language="javascript">
$(document).ready(function() {
var pars = $("p");
for( i=0; i<pars.length; i++ ){
alert("Found paragraph: " + pars[i].innerHTML);
}
});
</script>
</head>
<body>
<div>
<p class="myclass">This is a paragraph.</p>
<p id="myid">This is second paragraph.</p>
<p>This is third paragraph.</p>
</div>
</body>
</html>
</pre>
</td></tr>
</tbody></table>
<br />
<h1>
How to use Selectors?</h1>
The selectors are very useful and would be required at every step
while using jQuery. They get the exact element that you want from your
HTML document.<br />
Following table lists down few basic selectors and explains them with examples.<br />
<table border="1" cellpadding="5" cellspacing="5" class="src">
<tbody>
<tr><th width="40%">Selector</th><th>Description</th></tr>
<tr><td><a href="http://www.tutorialspoint.com/jquery/selector-element-name.htm">Name</a></td><td>Selects all elements which match with the given element <b>Name</b>.</td></tr>
<tr><td><a href="http://www.tutorialspoint.com/jquery/selector-element-id.htm">#ID</a></td><td>Selects a single element which matches with the given <b>ID</b></td></tr>
<tr><td><a href="http://www.tutorialspoint.com/jquery/selector-element-class.htm">.Class</a></td><td>Selects all elements which match with the given <b>Class</b>.</td></tr>
<tr><td><a href="http://www.tutorialspoint.com/jquery/selector-universal.htm">Universal (*)</a></td><td>Selects all elements available in a DOM.</td></tr>
<tr><td><a href="http://www.tutorialspoint.com/jquery/selector-multiple-elements.htm">Multiple Elements E, F, G</a></td><td>Selects the combined results of all the specified selectors <b>E, F</b> or <b>G</b>.</td></tr>
</tbody></table>
Similar to above syntax and examples, following examples would give
you understanding on using different type of other useful selectors:<br />
<ul>
<li><b>$('*'):</b> This selector selects all elements in the document.</li>
<li><b>$("p > *"):</b> This selector selects all elements that are children of a paragraph element.</li>
<li><b>$("#specialID"):</b> This selector function gets the element with id="specialID".</li>
<li><b>$(".specialClass"):</b> This selector gets all the elements that have the class of <i>specialClass</i>.</li>
<li><b>$("li:not(.myclass)"):</b> Selects all elements matched by <li> that do not have class="myclass".</li>
<li><b>$("a#specialID.specialClass"):</b> This selector matches links with an id of <i>specialID</i> and a class of <i>specialClass</i>.</li>
<li><b>$("p a.specialClass"):</b> This selector matches links with a class of <i>specialClass</i> declared within <p> elements.</li>
<li><b>$("ul li:first"):</b> This selector gets only the first <li> element of the <ul>.</li>
<li><b>$("#container p"):</b> Selects all elements matched by <p> that are descendants of an element that has an id of <i>container</i>.</li>
<li><b>$("li > ul"):</b> Selects all elements matched by <ul> that are children of an element matched by <li></li>
<li><b>$("strong + em"):</b> Selects all elements matched by <em> that immediately follow a sibling element matched by <strong>.</li>
<li><b>$("p ~ ul"):</b> Selects all elements matched by <ul> that follow a sibling element matched by <p>.</li>
<li><b>$("code, em, strong"):</b> Selects all elements matched by <code> or <em> or <strong>.</li>
<li><b>$("p strong, .myclass"):</b> Selects all elements matched by
<strong> that are descendants of an element matched by <p>
as well as all elements that have a class of <i>myclass</i>.</li>
<li><b>$(":empty"):</b> Selects all elements that have no children.</li>
<li><b>$("p:empty"):</b> Selects all elements matched by <p> that have no children.</li>
<li><b>$("div[p]"):</b> Selects all elements matched by <div> that contain an element matched by <p>.</li>
<li><b>$("p[.myclass]"):</b> Selects all elements matched by <p> that contain an element with a class of <i>myclass</i>.</li>
<li><b>$("a[@rel]"):</b> Selects all elements matched by <a> that have a rel attribute.</li>
<li><b>$("input[@name=myname]"):</b> Selects all elements matched by <input> that have a name value exactly equal to <i>myname.</i></li>
<li><b>$("input[@name^=myname]"):</b> Selects all elements matched by <input> that have a name value beginning with <i>myname</i>.</li>
<li><b>$("a[@rel$=self]"):</b> Selects all elements matched by <p> that have a class value ending with <i>bar</i></li>
<li><b>$("a[@href*=domain.com]"):</b> Selects all elements matched by <a> that have an href value containing domain.com.</li>
<li><b>$("li:even"):</b> Selects all elements matched by <li> that have an even index value.</li>
<li><b>$("tr:odd"):</b> Selects all elements matched by <tr> that have an odd index value.</li>
<li><b>$("li:first"):</b> Selects the first <li> element.</li>
<li><b>$("li:last"):</b> Selects the last <li> element.</li>
<li><b>$("li:visible"):</b> Selects all elements matched by <li> that are visible.</li>
<li><b>$("li:hidden"):</b> Selects all elements matched by <li> that are hidden.</li>
<li><b>$(":radio"):</b> Selects all radio buttons in the form.</li>
<li><b>$(":checked"):</b> Selects all checked boxex in the form.</li>
<li><b>$(":input"):</b> Selects only form elements (input, select, textarea, button).</li>
<li><b>$(":text"):</b> Selects only text elements (input[type=text]).</li>
<li><b>$("li:eq(2)"):</b> Selects the third <li> element</li>
<li><b>$("li:eq(4)"):</b> Selects the fifth <li> element</li>
<li><b>$("li:lt(2)"):</b> Selects all elements matched by <li> element before the third one; in other words, the first two <li> elements.</li>
<li><b>$("p:lt(3)"):</b> selects all elements matched by <p> elements before the fourth one; in other words the first three <p> elements.</li>
<li><b>$("li:gt(1)"):</b> Selects all elements matched by <li> after the second one.</li>
<li><b>$("p:gt(2)"):</b> Selects all elements matched by <p> after the third one.</li>
<li><b>$("div/p"):</b> Selects all elements matched by <p> that are children of an element matched by <div>.</li>
<li><b>$("div//code"):</b> Selects all elements matched by <code>that are descendants of an element matched by <div>.</li>
<li><b>$("//p//a"):</b> Selects all elements matched by <a> that are descendants of an element matched by <p></li>
<li><b>$("li:first-child"):</b> Selects all elements matched by <li> that are the first child of their parent.</li>
<li><b>$("li:last-child"):</b> Selects all elements matched by <li> that are the last child of their parent.</li>
<li><b>$(":parent"):</b> Selects all elements that are the parent of another element, including text.</li>
<li><b>$("li:contains(second)"):</b> Selects all elements matched by <li> that contain the text second.</li>
</ul>
You can use all the above selectors with any HTML/XML element in generic way. For example if selector <b>$("li:first")</b> works for <li> element then <b>$("p:first")</b> would also work for <p> element.<br />
</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-63402211399434377772012-08-16T02:47:00.001-07:002012-08-16T02:47:33.793-07:00integrate icici payment gateway php without JavaBridge/JDK<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<div class="MsoNormal">
<br /></div>
<h1>
<a href="" name="_Toc290626671"></a><a href="" name="_Toc275356555">The Installation
process for SFAClient.zip</a> </h1>
<div class="MsoNormal">
<span style="height: 8px; left: -1px; mso-ignore: vglayout; position: relative; top: 4px; width: 652px; z-index: 251665408;"><img height="4" src="file:///C:\DOCUME~1\KGanesh\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.gif" v:shapes="_x0000_s1026" width="652" /></span><o:p> </o:p></div>
<br clear="ALL" />
<div class="MsoBodyTextIndent" style="margin-left: 16.35pt; mso-hyphenate: auto; mso-list: l2 level1 lfo3; mso-pagination: widow-orphan; tab-stops: list 16.35pt; text-indent: -.25in;">
1.<span style="font-size: 7pt;">
</span>Unzip SFAClient.zip. This will create a folder
called SFAClient</div>
<div class="MsoBodyTextIndent" style="margin-left: .25in; mso-hyphenate: auto; mso-list: l2 level1 lfo3; mso-pagination: widow-orphan; tab-stops: list 16.35pt; text-indent: -.25in;">
2.<span style="font-size: 7pt;">
</span>SFAClient contains the following files and directory.</div>
<div class="MsoBodyTextIndent" style="margin-left: .5in; mso-hyphenate: auto; mso-list: l1 level1 lfo2; mso-pagination: widow-orphan; tab-stops: list .5in; text-indent: -.25in;">
1.<span style="font-size: 7pt;">
</span>Sfa – SFA Client library (contains the PHP Sfa library)<o:p></o:p></div>
<div class="MsoBodyTextIndent" style="margin-left: .5in; mso-hyphenate: auto; mso-list: l1 level1 lfo2; mso-pagination: widow-orphan; tab-stops: list .5in; text-indent: -.25in;">
2.<span style="font-size: 7pt;">
</span>Test Pages – Sample pages for transactions and a
test page (test.php) for testing php.</div>
<div class="MsoBodyTextIndent" style="margin-left: .5in; mso-hyphenate: auto; mso-list: l1 level1 lfo2; mso-pagination: widow-orphan; tab-stops: list .5in; text-indent: -.25in;">
3.<span style="font-size: 7pt;">
</span>sfa.properties</div>
<h2>
PHP Web Application Directory Structure – Sample Example</h2>
<div class="MsoBodyTextIndent" style="margin-left: 0.5in; text-indent: -0.25in;">
<span style="font-family: Symbol; font-size: 11.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><span style="font-family: "Times New Roman","serif"; font-size: 11.0pt; mso-bidi-font-size: 10.0pt;">Create the following PHP Web application directory structure as
given below<o:p></o:p></span></div>
<div class="MsoBodyTextIndent" style="margin-left: 1in; text-indent: -0.25in;">
<span style="font-family: "Courier New"; font-size: 11.0pt; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: "Courier New";">o<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="font-family: 'Times New Roman', serif; font-size: 11pt;">E.g. the Merchant website directory name is “<b>Merchant_Site_Dir</b>”.<o:p></o:p></span></div>
<div class="MsoBodyTextIndent" style="margin-left: 0.5in; text-indent: -0.25in;">
<span style="font-family: Symbol; font-size: 11.0pt; mso-bidi-font-family: Symbol; mso-bidi-font-size: 10.0pt; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span><span style="font-family: 'Times New Roman', serif; font-size: 11pt;">Copy all the directory
and files from unzipped SFAClient to Merchant_Site_Dir .<o:p></o:p></span></div>
<div class="MsoBodyTextIndent" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 0in; mso-hyphenate: auto; mso-pagination: widow-orphan;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 63.0pt; mso-hyphenate: auto; mso-list: l13 level2 lfo8; mso-pagination: widow-orphan; tab-stops: list 63.0pt; text-indent: -.25in;">
<span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;">§<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span>Place
the directory <b>Merchant_Site_Dir</b> in <b>C:/wamp/www/ </b>as shown below.</div>
<div class="MsoListParagraph" style="margin-left: 71.45pt; mso-add-space: auto; mso-list: l13 level1 lfo8; text-indent: -.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Sfa, Test Pages and sfa.properties</div>
<div class="MsoBodyTextIndent" style="margin-left: 45.0pt; mso-hyphenate: auto; mso-pagination: widow-orphan;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 45.0pt; mso-hyphenate: auto; mso-pagination: widow-orphan;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 0in; mso-hyphenate: auto; mso-pagination: widow-orphan;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: .25in; mso-hyphenate: auto; mso-pagination: widow-orphan;">
<b><span style="color: red;">Note: <o:p></o:p></span></b></div>
<div class="MsoBodyTextIndent" style="margin-left: 63.0pt; mso-hyphenate: auto; mso-list: l13 level2 lfo8; mso-pagination: widow-orphan; tab-stops: list 63.0pt; text-indent: -.25in;">
<span style="color: red; font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;">§<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="color: red;">Sfa folder should be copied to the folder where
TestPages/Merchant pages are present.<o:p></o:p></span></div>
<div class="MsoBodyTextIndent" style="margin-left: 63.0pt; mso-hyphenate: auto; mso-list: l13 level2 lfo8; mso-pagination: widow-orphan; tab-stops: list 63.0pt; text-indent: -.25in;">
<span style="color: red; font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;">§<span style="font-family: 'Times New Roman'; font-size: 7pt;"> </span></span><span style="color: red;">The directory names are case sensitive. Create them as mention
above.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<b><span style="font-family: "Times New Roman","serif"; font-size: 16.0pt; mso-ansi-language: EN-US; mso-bidi-language: AR-SA; mso-fareast-font-family: "Lucida Sans Unicode"; mso-fareast-language: #00FF;"><br clear="all" style="page-break-before: always;" />
</span></b>
<div class="MsoNormal">
<b><span style="font-size: 16.0pt;">Changes in Test Pages<o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
<ul style="margin-top: 0in;" type="circle">
<li class="MsoNormal"><span style="font-size: 11.0pt;">Open the SFAResponse.php and made some changes<o:p></o:p></span></li>
</ul>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
<?php</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
include("Sfa/EncryptionUtil.php");</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
<br /></div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$strMerchantId="00000001";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$astrFileName="c://key//sbi//00000001.key";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$astrClearData;</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$ResponseCode = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Message = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$TxnID = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$ePGTxnID = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$AuthIdCode = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$RRN = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$CVRespCode = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve1 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve2 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve3 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve4 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve5 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve6 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve7 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve8 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve9 = "";</div>
<div class="MsoNormal" style="margin-left: 4.5pt;">
$Reserve10 = "";</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<b><span style="color: red;">Note : </span></b><span style="color: red;">Mercant ID must be
same as the .key file name. e.g. if file is 00000001.key then Merchant ID must
be 00000001.<o:p></o:p></span></div>
<div class="MsoNormal">
<br /></div>
<ul style="margin-top: 0in;" type="circle">
<li class="MsoNormal">According
to merchant type i.e. SSL or MOTO change select the file and make the
changes</li>
<ul style="margin-top: 0in;" type="circle">
<li class="MsoNormal">e.g.
if Merchant is SSL Merchant then change the TestSsl.php</li>
</ul>
</ul>
<div class="MsoNormal">
<?php</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
include("Sfa/BillToAddress.php");</div>
<div class="MsoNormal">
include("Sfa/CardInfo.php");</div>
<div class="MsoNormal">
include("Sfa/Merchant.php");</div>
<div class="MsoNormal">
include("Sfa/MPIData.php");</div>
<div class="MsoNormal">
include("Sfa/ShipToAddress.php");</div>
<div class="MsoNormal">
include("Sfa/PGResponse.php");</div>
<div class="MsoNormal">
include("Sfa/PostLibPHP.php");</div>
<div class="MsoNormal">
include("Sfa/PGReserveData.php");</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oMPI = new MPIData();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oCI = new CardInfo();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oPostLibphp = new PostLibPHP();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oMerchant = new Merchant();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oBTA = new BillToAddress();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oSTA = new ShipToAddress();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oPGResp = new PGResponse();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oPGReserveData = new
PGReserveData();</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
$oMerchant->setMerchantDetails("00000001","00001203","00001203","193.545.34.33",rand()."","Ord123","http://10.10.10.167/SFAResponse.php","POST","INR","INV123","req.Sale","100","","Ext1","true","Ext3","Ext4","Ext5");</div>
<div class="MsoNormal">
?></div>
<div class="MsoNormal">
Put marchant id.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<ul style="margin-top: 0in;" type="circle">
<li class="MsoNormal">e.g.
if Merchant is Moto Merchant then change the TestMoto.php</li>
</ul>
<div class="MsoNormal" style="margin-left: .25in;">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: .25in; mso-list: l3 level1 lfo4; tab-stops: list .25in; text-indent: -.25in;">
<a href="" name="_Toc275356556">1.<span style="font-size: 7pt;"> </span>Editing
the sfa.properties file:</a></div>
<div class="MsoNormal">
<b>Set the key directory path<o:p></o:p></b></div>
<div class="MsoBodyTextIndent" style="margin-left: .25in;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 0in; mso-hyphenate: auto; mso-pagination: widow-orphan;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: .5in; mso-list: l7 level1 lfo5; text-indent: -.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>'Key.Directory' should contain the name of the
folder, which contains the merchant key. A trailing slash has to be included at
the end of this value. The name of the file (.key file) need not be set. Save
the file after making other relevant changes.</div>
<div class="MsoBodyTextIndent" style="margin-left: 63.0pt; mso-list: l13 level2 lfo8; tab-stops: list 63.0pt; text-indent: -.25in;">
<span style="font-family: Wingdings; mso-bidi-font-family: Wingdings; mso-fareast-font-family: Wingdings;">§<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Key.Directory=D://WAMP//WWW//key//</div>
<div class="MsoBodyTextIndent" style="margin-left: 45.0pt;">
<b><span style="color: red;">Note</span></b><span style="color: red;">: Don’t include key in key directory path.<o:p></o:p></span></div>
<div class="MsoBodyTextIndent" style="margin-left: .5in; mso-list: l7 level1 lfo5; text-indent: -.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Enable the verbose parameter to “true” only when
required to generate logs. These logs are to be used for debugging (while
integration) and should not be set to “true” in production as it might lead to
considerable amount of logs depending on the number of transactions.</div>
<div class="MsoBodyTextIndent" style="margin-left: .5in; mso-list: l7 level1 lfo5; text-indent: -.25in;">
<span style="font-family: Symbol; mso-bidi-font-family: Symbol; mso-fareast-font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>To verify the success of the above operations
open the jar file again and check if the properties file has the values set.</div>
<div class="MsoBodyTextIndent" style="margin-left: 0in;">
<br /></div>
<h1 style="margin-left: 0in; text-indent: 0in;">
<o:p> </o:p></h1>
<h1 style="margin-left: 0in; text-indent: 0in;">
<o:p> </o:p></h1>
<h1 style="margin-left: 0in; text-indent: 0in;">
<a href="" name="_Toc290626673">Enabling Curl extensions</a> </h1>
<h1 style="margin-left: 0in; mso-list: l4 level8 lfo13; text-indent: 0in;">
<a href="" name="_Toc290626674"></a><a href="" name="_Toc290569639"></a><a href="" name="_Toc290568030"></a><a href="" name="_Toc290542685"></a><a href="" name="_Toc290542654"></a><a href="" name="_Toc290542624"></a><a href="" name="_Toc290542603"></a><a href="" name="_Toc290542583"></a><a href="" name="_Toc290542509"></a><a href="" name="_Toc290542473"></a><span style="height: 14px; left: -3px; mso-ignore: vglayout; position: relative; top: 10px; width: 652px; z-index: 251682816;"><img height="4" src="file:///C:\DOCUME~1\KGanesh\LOCALS~1\Temp\msohtmlclip1\01\clip_image002.gif" v:shapes="_x0000_s1029" width="652" /></span><o:p> </o:p></h1>
<br clear="ALL" />
<div class="MsoNormal">
The curl extension
files are </div>
<div class="MsoNormal">
<br /></div>
<ul style="margin-top: 0in;" type="disc">
<li class="MsoNormal">libeay32.dll<span style="font-size: 18.0pt; mso-bidi-font-size: 12.0pt;"><o:p></o:p></span></li>
<li class="MsoNormal">ssleay32.dll</li>
</ul>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
These files should
be present in to <b>C:\WINDOWS\system32</b>
and <b>Php installation directory</b>.</div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
Open the <b>php.ini</b> file from PHP installation
directory remove the semicolon of <b>extension=php_curl.dll</b>.</div>
<h1>
<o:p> </o:p></h1>
<div class="MsoNormal">
<br /></div>
<h1 style="margin-left: 0in; text-indent: 0in;">
<a href="" name="_Toc290626675">Disabling mcrypt extensions</a> (for PHP version <= 4.4.4)
</h1>
<h1 style="margin-left: 0in; text-indent: 0in;">
<a href="" name="_Toc290626676"></a><a href="" name="_Toc290569641"></a><a href="" name="_Toc290568032"></a><a href="" name="_Toc290542687"></a><a href="" name="_Toc290542656"></a><a href="" name="_Toc290542626"></a><a href="" name="_Toc290542605"></a><a href="" name="_Toc290542585"></a><a href="" name="_Toc290542511"></a><a href="" name="_Toc290542475"></a><span style="height: 12px; left: -2px; mso-ignore: vglayout; position: relative; top: 8px; width: 652px; z-index: 251684864;"><img height="4" src="file:///C:\DOCUME~1\KGanesh\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.gif" v:shapes="_x0000_s1031" width="652" /></span><o:p> </o:p></h1>
<ul style="margin-top: 0in;" type="disc">
<br clear="ALL" />
<li class="MsoNormal">Open the <b>php.ini</b> file from PHP installation directory add the semicolon
on start of line <b>;extension=php_mcrypt.dll </b>(if
semicolon not present).</li>
</ul>
<div class="MsoNormal">
<br /></div>
<h1 style="margin-left: 0in; text-indent: 0in;">
<a href="" name="_Toc290626678"></a><a href="" name="_Toc290626677">Checklist</a></h1>
<div class="MsoNormal">
<span style="height: 7px; left: -2px; mso-ignore: vglayout; position: relative; top: 3px; width: 652px; z-index: 251666432;"><img height="4" src="file:///C:\DOCUME~1\KGanesh\LOCALS~1\Temp\msohtmlclip1\01\clip_image001.gif" v:shapes="_x0000_s1027" width="652" /></span><o:p> </o:p></div>
<br clear="ALL" />
<div align="left" class="MsoBodyTextIndent" style="margin-left: 55.25pt; text-indent: -19.8pt;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Merchant should have
access to ePG over https<o:p></o:p></div>
<div align="left" class="MsoBodyTextIndent" style="margin-left: 55.25pt; text-indent: -19.8pt;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Check connectivity
between php<o:p></o:p></div>
<div align="left" class="MsoBodyTextIndent" style="margin-left: 64.9pt; text-indent: -0.25in;">
1.<span style="font-size: 7pt;">
</span>Restart the IIS Server<o:p></o:p></div>
<div align="left" class="MsoBodyTextIndent" style="margin-left: 64.9pt; text-indent: -0.25in;">
2.<span style="font-size: 7pt;">
</span>Browse the
testjava.php page either from browser of from IIS as shown below<o:p></o:p></div>
<div align="left" class="MsoBodyTextIndent" style="margin-left: 100.9pt; text-indent: -100.9pt;">
<span style="font-size: 7pt;">
</span>i.<span style="font-size: 7pt;"> </span>Url : http://localhost/Merchant_Site_Name/test.php<o:p></o:p></div>
<div align="left" class="MsoBodyTextIndent" style="margin-left: 0in;">
<br /></div>
<div align="left" class="MsoBodyTextIndent" style="margin-left: 0in;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 0in;">
<br /></div>
<h1 style="margin-left: 0in; text-indent: 0in;">
<a href="" name="_Toc290626679"></a><a href="" name="_Toc275356557">Transaction
Testing</a></h1>
<div class="MsoNormal">
<span style="height: 9px; left: -2px; mso-ignore: vglayout; position: relative; top: 5px; width: 652px; z-index: 251667456;"><img height="4" src="file:///C:\DOCUME~1\KGanesh\LOCALS~1\Temp\msohtmlclip1\01\clip_image002.gif" v:shapes="_x0000_s1028" width="652" /></span><o:p> </o:p></div>
<br clear="ALL" />
<div class="MsoBodyTextIndent" style="margin-left: 63pt; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Restart the Apache<o:p></o:p></div>
<div class="MsoBodyTextIndent" style="margin-left: 63pt; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Open the PHP page
either from browser or from Apache<o:p></o:p></div>
<div class="MsoBodyTextIndent" style="margin-left: 63pt; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>If Merchant is SSL
then open TestSsl.php else if Merchant is Moto then TestMoto.php<o:p></o:p></div>
<div class="MsoBodyTextIndent" style="margin-left: 143.45pt; text-indent: -80.45pt;">
1.<span style="font-size: 7pt;">
</span>From IIS<o:p></o:p></div>
<div class="MsoBodyTextIndent" style="margin-left: 0.25in;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 0.25in;">
2. From Browser<o:p></o:p></div>
<div class="MsoBodyTextIndent" style="margin-left: 99pt; text-indent: -0.25in;">
<span style="font-family: Symbol;">·<span style="font-family: 'Times New Roman'; font-size: 7pt;">
</span></span>Type the URL :
http://localhost/Merchant_Site_name/TestSsl.php<o:p></o:p></div>
<div class="MsoBodyTextIndent" style="margin-left: 0in;">
<br /></div>
<div class="MsoBodyTextIndent" style="margin-left: 0in;">
<br /></div>
<h1 style="margin-left: 0in; text-indent: 0in;">
<a href="" name="_Toc290626680">Troubleshooting</a></h1>
<h1>
<span style="height: 12px; left: -4px; mso-ignore: vglayout; position: relative; top: 8px; width: 652px; z-index: 251683840;"><img height="4" src="file:///C:\DOCUME~1\KGanesh\LOCALS~1\Temp\msohtmlclip1\01\clip_image002.gif" v:shapes="_x0000_s1030" width="652" /></span><a href="" name="_Toc290626681"></a><a href="" name="_Toc290569646"></a><a href="" name="_Toc290568037"></a><a href="" name="_Toc290542692"></a><a href="" name="_Toc290542659"></a><a href="" name="_Toc290542631"></a><a href="" name="_Toc290542610"></a><a href="" name="_Toc290542590"></a><a href="" name="_Toc290542516"></a><a href="" name="_Toc290542481"></a><o:p> </o:p></h1>
<br clear="ALL" />
<div class="MsoNormal">
<span style="color: red;">Problem :</span> In log file if you
got <b>SSL certificate problem….<o:p></o:p></b></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<br /></div>
<div class="MsoNormal">
<span style="color: blue;">Solution :</span> Add the
certificate CSR in \Sfa\cacerts.pem file. (Refer <b>Adding Certificates in Cacerts</b>
section).<b><span style="font-size: 16.0pt;"><o:p></o:p></span></b></div>
<div class="MsoNormal">
<br /></div>
</div>
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com37tag:blogger.com,1999:blog-4493856116928207359.post-75685574129764766522012-08-07T05:08:00.002-07:002012-08-07T05:08:48.313-07:00Basic Linux Commands<div dir="ltr" style="text-align: left;" trbidi="on">
<div class="inside">
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">mkdir - make directories</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Usage</span></span><br />
<span lang="EN-US" style="font-family: Verdana;">
<span style="color: #cc0066; font-size: x-small;">mkdir [OPTION] DIRECTORY</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Options</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Create the DIRECTORY(ies), if they do not already exist.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> Mandatory arguments to long options are mandatory for
short options too.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -m, mode=MODE <span style="color: #009900; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;"><span class="kLink" style="background-color: transparent; border-bottom: 1px solid rgb(0, 153, 0); color: rgb(0, 153, 0) ! important; font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: static;">set </span><span class="kLink" style="background-color: transparent; border-bottom: 1px solid rgb(0, 153, 0); color: rgb(0, 153, 0) ! important; font-family: inherit ! important; font-size: inherit ! important; font-weight: inherit ! important; position: static;">permission</span></span> mode (as in chmod), not rwxrwxrwx -
umask</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -p, parents no error if existing, make parent directories as
needed</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -v, verbose print a message for each created directory</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -help display this help and exit</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -version output version information and exit</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">cd - change directories</span></span><br />
<span lang="en-us"><span style="font-size: x-small;">Use cd to change directories.
Type cd followed by the name of a directory to access that
directory.Keep in mind that you are always in a directory and
can navigate to directories hierarchically above or below.</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">mv- change the name of a directory</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Type mv followed by the current name of a directory and the new
name of the directory.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> Ex: mv testdir newnamedir
</span> </span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">pwd - print working directory</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">will show you the full path to the directory you are currently
in. This is very handy to use, especially when
performing some of the other commands on this page</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> </span></span><span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;"><span style="font-size: x-small;">rmdir
-</span></span><span lang="en-us" style="color: #cc0066; font-family: Verdana; font-weight: 700;"><span style="font-size: x-small;"> </span></span><span lang="EN-US" style="font-family: Verdana; font-weight: 700;"><span style="color: #cc0066; font-size: x-small;">Remove an existing directory </span> </span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> </span></span><span style="color: #cc0066; font-size: x-small;"><span lang="EN-US" style="font-family: Verdana; font-weight: 700;">rm
-r</span></span><span lang="EN-US" style="color: #333333; font-family: Verdana;"><span style="font-size: x-small;">
</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Removes directories and files within the directories
recursively.</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">chown - change file owner and group</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Usage</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana;">
<span style="font-size: x-small;">chown [OPTION] OWNER[:[GROUP]] FILE</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana;">
<span style="font-size: x-small;">chown [OPTION] :GROUP FILE</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana;">
<span style="font-size: x-small;">chown [OPTION] --reference=RFILE FILE</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Options</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Change the owner and/or group of each FILE to OWNER and/or
GROUP. With --reference, change the owner and group of each
FILE to those of RFILE.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -c, changes like verbose but report only when a change is made</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -dereference affect the referent of each symbolic link, rather
than the symbolic link itself</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -h, no-dereference affect each symbolic link instead of
any referenced file (useful only on systems that can </span></span>
<span lang="en-us" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">
</span></span>
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> change the
ownership of a symlink)</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> -from=CURRENT_OWNER:CURRENT_GROUP</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> change the owner and/or group of each file only if
its current owner and/or group match those specified here.
Either may be omitted, in which case a match is not required
for the omitted attribute.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-no-preserve-root do not treat `/' specially (the
default)</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-preserve-root fail to operate recursively on `/'
</span> </span>
<br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-f, -silent, -quiet suppress most error messages</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-reference=RFILE use RFILE's owner and group rather than the
specifying OWNER:GROUP values</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-R, -recursive operate on files and directories recursively</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-v, -verbose output a diagnostic for every file processed</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">The following options modify how a hierarchy is
traversed when the -R option is also specified. If more
than one is specified, only the final one takes effect.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-H if a <a class="kLink" href="http://www.debianhelp.co.uk/commands.htm#" id="KonaLink1" style="font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static; text-decoration: underline !important;"><span style="color: #009900; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;"><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">command </span><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">line</span></span></a> argument is a symbolic link to a
directory, traverse it</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-L traverse every symbolic link to a directory
encountered</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-P do not traverse any symbolic links (default)</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">chmod - change file <a class="kLink" href="http://www.debianhelp.co.uk/commands.htm#" id="KonaLink2" style="font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static; text-decoration: underline !important;"><span style="color: #009900; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;"><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">access </span><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">permissions</span></span></a></span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Usage</span></span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana;">
chmod [-r] permissions filenames</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> r Change the permission on files that are in the
subdirectories of the directory that you are currently in.
permission Specifies the rights that are being granted. Below
is the different rights that you can grant in an alpha numeric
format.filenames File or directory that you are associating the
rights with
Permissions</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">u - User who owns the file.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">g - Group that owns the file.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">o - Other.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">a - All.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">r - Read the file.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">w - Write or edit the file.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">x - Execute or run the file as a program.</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Numeric Permissions:</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">CHMOD can also to attributed by using Numeric Permissions:</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">400 read by owner</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">040 read by group</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">004 read by anybody (other)</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">200 write by owner</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">020 write by group</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">002 write by anybody</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">100 execute by owner</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">010 execute by group</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">001 execute by anybody</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">ls - Short listing of directory contents </span> </span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-a list hidden files</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-d list the name of the current directory</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-F show directories with a trailing '/'</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> executable files with a trailing '*'</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-g show group ownership of file in long listing</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-i print the <a class="kLink" href="http://www.debianhelp.co.uk/commands.htm#" id="KonaLink3" style="font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static; text-decoration: underline !important;"><span style="color: #009900; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;"><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">inode </span><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">number</span></span></a> of each file</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-l long listing giving details about files and
directories</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-R list all subdirectories encountered</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">-t sort by time modified instead of name</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">cp - Copy files </span> </span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana;">
cp myfile yourfile</span></span><span lang="EN-US" style="color: #333333; font-family: Verdana;"><span style="font-size: x-small;">
</span> </span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Copy the files "myfile" to the file "yourfile" in the <a class="kLink" href="http://www.debianhelp.co.uk/commands.htm#" id="KonaLink4" style="font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static; text-decoration: underline !important;"><span style="color: #009900; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;"><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">current </span><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">
working </span><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">directory</span></span></a>. This command
will create the file "yourfile" if it doesn't exist. It will
normally overwrite it without warning if it exists. </span> </span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana;">
cp -i myfile yourfile</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">With the "-i" option, if the file "yourfile" exists, you will be
prompted before it is overwritten. </span> </span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana;">
cp -i /data/myfile </span></span>
<br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Copy the file "/data/myfile" to the current working directory
and name it "myfile". Prompt before overwriting the file. </span></span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana;">
cp -dpr srcdir destdir</span></span><span lang="EN-US" style="color: #333333; font-family: Verdana;"><span style="font-size: x-small;">
</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Copy all files from the directory "srcdir" to the directory "destdir"
preserving links (-poption), file attributes (-p option), and
copy recursively (-r option). With these options, a directory
and all it contents can be copied to another dir</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">ln - Creates a symbolic link to a file.</span></span><br />
<span lang="EN-US" style="font-family: Verdana;">
<span style="color: #cc0066; font-size: x-small;">ln -s test symlink</span></span><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Creates a symbolic link named symlink that points to the file
test Typing "ls -i test symlink" will show the two files are
different with different inodes. Typing "ls -l test symlink"
will show that symlink points to the file test. </span> </span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana; font-weight: 700;">
locate</span></span><span lang="EN-US" style="color: #333333; font-family: Verdana;"><span style="font-size: x-small;">
</span></span><span style="font-size: x-small;"><span style="color: #cc0066;">
<span lang="EN-US" style="font-family: Verdana;">-</span></span><span lang="EN-US" style="color: #333333; font-family: Verdana;"> A fast database driven file locator.</span></span><br />
<b><span style="color: #cc0066; font-size: x-small;"><span lang="EN-US" style="font-family: Verdana;">slocate
-u</span></span><span lang="EN-US" style="color: #cc0066; font-family: Verdana;"><span style="font-size: x-small;">
</span>
</span></b><br />
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">This command builds the slocate database. It will take several
minutes to complete this command.This command must be used
before <a class="kLink" href="http://www.debianhelp.co.uk/commands.htm#" id="KonaLink5" style="font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static; text-decoration: underline !important;"><span style="color: #009900; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;"><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">searching </span><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">for </span><span class="kLink" style="color: #009900 !important; font-family: inherit !important; font-size: inherit !important; font-weight: inherit !important; position: static;">files</span></span></a>, however cron runs this command
periodically </span></span>
<span lang="en-us" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;"> </span></span><span lang="EN-US" style="color: #333333; font-family: Verdana;"><span style="font-size: x-small;">on
most systems.locate whereis Lists all files
whose names contain the string "whereis". directory. </span> </span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">more - </span> </span>
<span lang="EN-US" style="font-family: Verdana;">
<span style="font-size: x-small;">Allows file contents or piped output to be sent to the
screen one page at a time</span></span><br />
<span lang="EN-US" style="color: #cc0066; font-family: Verdana; font-weight: 700;">
<span style="font-size: x-small;">less - </span></span>
<span lang="EN-US" style="font-family: Verdana;">
<span style="font-size: x-small;">Opposite of the more command</span></span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana; font-weight: 700;">
cat</span></span><span style="font-size: x-small;"><span lang="EN-US" style="color: #333333; font-family: Verdana;"> </span>
<span style="color: #cc0066;">
<span lang="EN-US" style="font-family: Verdana;">-</span></span><span lang="EN-US" style="color: #333333; font-family: Verdana;"> Sends file contents to standard output. This is a way to list
the contents of short files </span>
</span>
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">to the screen. It works well with
piping.</span></span><br />
<span lang="EN-US" style="font-family: Verdana;">
<b><span style="color: #cc0066; font-size: x-small;">whereis</span></b></span><span lang="EN-US" style="color: #cc0066; font-family: Verdana;"><span style="font-size: x-small;">
-
</span></span>
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Report all known instances of a command</span></span><br />
<span style="color: #cc0066; font-size: x-small;">
<span lang="EN-US" style="font-family: Verdana; font-weight: 700;">
wc - </span></span>
<span lang="EN-US" style="color: #333333; font-family: Verdana;">
<span style="font-size: x-small;">Print byte, word, and line counts</span></span><br />
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">bg</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
</span></span></b></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">bg jobs</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
Places the
current job (or, by using the alternative form, the specified
jobs) in the background, suspending its execution so that a new
user prompt appears immediately. Use the
</span></span>
<span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">jobs</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
command to discover the identities of background jobs.</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">cal month
year</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span><span style="color: #cc0066;">-</span><span style="color: black;">
Prints a calendar
for the specified month of the specified year.</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">cat files</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span><span style="color: #cc0066;">-</span><span style="color: black;">
Prints the
contents of the specified files.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">clear</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Clears the
terminal screen.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">cmp file1
file2</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Compares two
files, reporting all discrepancies. Similar to the </span> </span>
</span><span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">diff</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
command, though the output format differs.</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">diff file1
file2</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span><span style="color: #cc0066;">-</span><span style="color: black;">
Compares two
files, reporting all discrepancies. Similar to the
</span></span><span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">cmp</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;"> command, though the output format differs.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">dmesg</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Prints the
messages resulting from the most recent system boot.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">fg</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
</span></span></b></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">fg jobs</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
-</span><span style="color: black;">
Brings the
current job (or the specified jobs) to the foreground.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">file files</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Determines and
prints a description of the type of each specified file.</span></span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">find path -name pattern
-print</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
Searches the
specified path for files with names matching the specified
pattern (usually enclosed in single quotes) and prints their
names. The
</span></span>
<span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">find</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
command has many other arguments and functions; see the online
documentation.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">finger users - </span></span></b>
<span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">Prints
descriptions of the specified users.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">free</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Displays the
amount of used and free system memory.</span></span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">ftp hostname</span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">Opens an FTP
connection to the specified host, allowing files to be
transferred. The FTP program provides subcommands for
accomplishing file transfers; see the online documentation.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">head files</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Prints the first
several lines of each specified file.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">ispell files</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Checks the
spelling of the contents of the specified files.</span></span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">kill
process_ids</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">kill - signal process_ids</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">kill -l</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
</span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">Kills the
specified processes, sends the specified processes the specified
signal (given as a number or name), or prints a list of
available signals.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">killall
program</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
</span></span></b></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">killall - signal program</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
Kills all
processes that are instances of the specified program or sends
the specified signal to all processes that are instances of the
specified program.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">mail</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Launches a simple
mail client that permits sending and receiving email messages.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">man title</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
</span></span></b></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">man section title</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: #cc0066;">
-
</span><span style="color: black;">Prints the
specified man page.</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">ping host</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span><span style="color: #cc0066;">- </span><span style="color: black;">
Sends an echo
request via TCP/IP to the specified host. A response confirms
that the host is operational.</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">reboot</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span><span style="color: #cc0066;">-</span><span style="color: black;">
Reboots the
system (requires
</span></span>
<span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">root</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
privileges).</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">shutdown
minutes</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">shutdown -r
minutes</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span></span></div>
<div class="MsoNormal">
<span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
Shuts down the
system after the specified number of minutes elapses (requires
</span></span><span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">root</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
privileges). The -r option causes the system to be
rebooted once it has shut down.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">sleep time</span></span><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Causes the
command interpreter to pause for the specified number of
seconds.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">sort files</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Sorts the
specified files. The command has many useful arguments; see the
online documentation.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">split file</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Splits a file
into several smaller files. The command has many arguments; see
the online documentation</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">sync</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Completes all
pending input/output operations (requires </span> </span></span>
<span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">root</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
privileges).</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">telnet host</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span><span style="color: #cc0066;">-</span><span style="color: black;">
Opens a login
session on the specified host.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">top</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Prints a display
of system processes that's continually updated until the user
presses the </span> </span></span>
<span style="color: black; font-size: 10.0pt;">
<span style="font-family: Verdana;">q</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
key.</span></span></div>
<div class="MsoNormal">
<span style="color: #cc0066; font-size: 10.0pt; font-weight: 700;">
<span style="font-family: Verdana;">traceroute
host</span></span><span style="font-family: Verdana; font-size: x-small;"><span style="color: black;">
</span><span style="color: #cc0066;">-</span><span style="color: black;">
Uses echo
requests to determine and print a network path to the host.</span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">uptime</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Prints the system
uptime.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">w</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
- </span>
</span></span></b><span style="font-family: Verdana;">
<span style="color: black;"><span style="font-size: x-small;">Prints the
current system users.</span></span></span></div>
<div class="MsoNormal">
<b>
<span style="color: #cc0066; font-size: 10.0pt;">
<span style="font-family: Verdana;">wall</span></span><span style="font-family: Verdana;"><span style="color: #cc0066;"><span style="font-size: x-small;">
-</span></span></span></b><span style="font-family: Verdana;"><span style="color: black;"><span style="font-size: x-small;"> Prints a message
to each user except those who've disabled message reception.
Type <b>Ctrl-D</b> to end the message.</span></span></span></div>
</div>
<ins style="border: none; display: inline-table; height: 90px; margin: 0; padding: 0; position: relative; visibility: visible; width: 728px;"></ins><br />
<ins id="aswift_1_anchor" style="border: none; display: block; height: 90px; margin: 0; padding: 0; position: relative; visibility: visible; width: 728px;"></ins><br />
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-73620846168503965872012-08-04T02:03:00.005-07:002012-08-04T02:03:46.777-07:00Demo/About/Documentation geolocation API , IP address based Geolocation<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
Demo/About/Documentation geolocation API<br />
<br />
The geolocation-feature implements the navigator.geolocation API. The following methods are available:<br />
<br />
navigator.getCurrentPosition: successCallback, errorCallback and options ({timeout: number}) are supported<br />
navigator.watchPosition: in shim identical to getCurrentPosition, except it returns an useless ID<br />
navigator.clearWatch: is noop in shim<br />
<br />
The shim uses the geolocation information provided by http://freegeoip.net and/or googles API-Loader<br />
Options for geolocation<br />
<br />
confirmText (string): confirm text for requesting access to geo data.<br />
<br />
$.webshims.setOptions('geolocation', { confirmText: '{location} wants to know your position. It is Ok to press Ok.' }); navigator.geolocation.getCurrentPosition(function(pos){ alert("Thx, you are @ latitude: "+ pos.coords.latitude +"/longitude: " + pos.coords.longitude); });<br />
<br />
The following code extracts illustrate how to obtain basic location information:<br />
<br />
Example of a "one-shot" position request.<br />
<br />
function showMap(position) {<br />
// Show a map centered at (position.coords.latitude, position.coords.longitude).<br />
}<br />
<br />
// One-shot position request.<br />
navigator.geolocation.getCurrentPosition(showMap);<br />
<br />
<br />
Example of requesting repeated position updates.<br />
<br />
function scrollMap(position) {<br />
// Scrolls the map so that it is centered at (position.coords.latitude, position.coords.longitude).<br />
}<br />
<br />
// Request repeated updates.<br />
var watchId = navigator.geolocation.watchPosition(scrollMap);<br />
<br />
function buttonClickHandler() {<br />
// Cancel the updates when the user clicks a button.<br />
navigator.geolocation.clearWatch(watchId);<br />
}<br />
<br />
<br />
Example of requesting repeated position updates and handling errors.<br />
<br />
function scrollMap(position) {<br />
// Scrolls the map so that it is centered at (position.coords.latitude, position.coords.longitude).<br />
}<br />
<br />
function handleError(error) {<br />
// Update a div element with error.message.<br />
}<br />
<br />
// Request repeated updates.<br />
var watchId = navigator.geolocation.watchPosition(scrollMap, handleError);<br />
<br />
function buttonClickHandler() {<br />
// Cancel the updates when the user clicks a button.<br />
navigator.geolocation.clearWatch(watchId);<br />
}<br />
<br />
<br />
Example of requesting a potentially cached position.<br />
<br />
// Request a position. We accept positions whose age is not<br />
// greater than 10 minutes. If the user agent does not have a<br />
// fresh enough cached position object, it will automatically<br />
// acquire a new one.<br />
navigator.geolocation.getCurrentPosition(successCallback,<br />
errorCallback,<br />
{maximumAge:600000});<br />
<br />
function successCallback(position) {<br />
// By using the 'maximumAge' option above, the position<br />
// object is guaranteed to be at most 10 minutes old.<br />
}<br />
<br />
function errorCallback(error) {<br />
// Update a div element with error.message.<br />
}<br />
<br />
<br />
<br />
Forcing the user agent to return a fresh cached position.<br />
<br />
// Request a position. We only accept cached positions whose age is not<br />
// greater than 10 minutes. If the user agent does not have a fresh<br />
// enough cached position object, it will immediately invoke the error<br />
// callback.<br />
navigator.geolocation.getCurrentPosition(successCallback,<br />
errorCallback,<br />
{maximumAge:600000, timeout:0});<br />
<br />
function successCallback(position) {<br />
// By using the 'maximumAge' option above, the position<br />
// object is guaranteed to be at most 10 minutes old.<br />
// By using a 'timeout' of 0 milliseconds, if there is<br />
// no suitable cached position available, the user agent<br />
// will asynchronously invoke the error callback with code<br />
// TIMEOUT and will not initiate a new position<br />
// acquisition process.<br />
}<br />
<br />
function errorCallback(error) {<br />
switch(error.code) {<br />
case error.TIMEOUT:<br />
// Quick fallback when no suitable cached position exists.<br />
doFallback();<br />
// Acquire a new position object.<br />
navigator.geolocation.getCurrentPosition(successCallback, errorCallback);<br />
break;<br />
case ... // treat the other error cases.<br />
};<br />
}<br />
<br />
function doFallback() {<br />
// No fresh enough cached position available.<br />
// Fallback to a default position.<br />
}<br />
<br />
<br />
Forcing the user agent to return any available cached position.<br />
<br />
// Request a position. We only accept cached positions, no matter what<br />
// their age is. If the user agent does not have a cached position at<br />
// all, it will immediately invoke the error callback.<br />
navigator.geolocation.getCurrentPosition(successCallback,<br />
errorCallback,<br />
{maximumAge:Infinity, timeout:0});<br />
<br />
function successCallback(position) {<br />
// By setting the 'maximumAge' to Infinity, the position<br />
// object is guaranteed to be a cached one.<br />
// By using a 'timeout' of 0 milliseconds, if there is<br />
// no cached position available at all, the user agent<br />
// will immediately invoke the error callback with code<br />
// TIMEOUT and will not initiate a new position<br />
// acquisition process.<br />
if (position.timestamp < freshness_threshold &&<br />
position.coords.accuracy < accuracy_threshold) {<br />
// The position is relatively fresh and accurate.<br />
} else {<br />
// The position is quite old and/or inaccurate.<br />
}<br />
}<br />
<br />
function errorCallback(error) {<br />
switch(error.code) {<br />
case error.TIMEOUT:<br />
// Quick fallback when no cached position exists at all.<br />
doFallback();<br />
// Acquire a new position object.<br />
navigator.geolocation.getCurrentPosition(successCallback, errorCallback);<br />
break;<br />
case ... // treat the other error cases.<br />
};<br />
}<br />
<br />
function doFallback() {<br />
// No cached position available at all.<br />
// Fallback to a default position.<br />
}<br />
<br />
IP address based Geolocation<br />
<br />
So now the obvious question is what about those browsers that don’t support geolocation at all? The answer is that we must use an external geolocation service. These services do their best to map the IP address of a device to geographic locations using large geolocation databases. Usually they do a good job, but at times they may suffer from the following issues:<br />
<br />
IP addresses may be associated with the wrong location (e.g., the wrong postal code, city or suburb within a metropolitan area).<br />
Addresses may be associated only with a very broad geographic area (e.g., a large city, or a state). Many addresses are associated only with a city, not with a street address or latitude/longitude location.<br />
Some addresses will not appear in the database and therefore cannot be mapped (often true for IP numbers not commonly used on the Internet).<br />
<br />
The important thing to remember is that when an external geolocation service is used, the accuracy is not as good as geolocation native to the device, and in some scenarios it may be completely off. Additionally, such services do not provide any information regarding the altitude, speed or heading of the device. Regardless, when GPS or triangulation are not available, they are a good fallback.<br />
<br />
YQL Geo Library is a dedicated and lightweight library that lets you perform geolocation using good old Yahoo services. This library can do other things which I’ll leave to you to discover, but for now let’s look at how we should modify our code to successfully detect the location on both supporting and non-supporting browsers:<br />
view plaincopy to clipboardprint?<br />
<br />
<!DOCTYPE html> <br />
<html> <br />
<br />
<head> <br />
<script src="js/jquery-1.4.2.min.js"></script> <br />
<script src="js/yqlgeo.js"></script> <br />
<script> <br />
jQuery(window).ready(function(){ <br />
jQuery("#btnInit").click(initiate_geolocation); <br />
}) <br />
<br />
function initiate_geolocation() { <br />
if (navigator.geolocation) <br />
{ <br />
navigator.geolocation.getCurrentPosition(handle_geolocation_query, handle_errors); <br />
} <br />
else <br />
{ <br />
yqlgeo.get('visitor', normalize_yql_response); <br />
} <br />
} <br />
<br />
function handle_errors(error) <br />
{ <br />
switch(error.code) <br />
{ <br />
case error.PERMISSION_DENIED: alert("user did not share geolocation data"); <br />
break; <br />
<br />
case error.POSITION_UNAVAILABLE: alert("could not detect current position"); <br />
break; <br />
<br />
case error.TIMEOUT: alert("retrieving position timedout"); <br />
break; <br />
<br />
default: alert("unknown error"); <br />
break; <br />
} <br />
} <br />
<br />
function normalize_yql_response(response) <br />
{ <br />
if (response.error) <br />
{ <br />
var error = { code : 0 }; <br />
handle_error(error); <br />
return; <br />
} <br />
<br />
var position = { <br />
coords : <br />
{ <br />
latitude: response.place.centroid.latitude, <br />
longitude: response.place.centroid.longitude <br />
}, <br />
address : <br />
{ <br />
city: response.place.locality2.content, <br />
region: response.place.admin1.content, <br />
country: response.place.country.content <br />
} <br />
}; <br />
<br />
handle_geolocation_query(position); <br />
} <br />
<br />
function handle_geolocation_query(position){ <br />
alert('Lat: ' + position.coords.latitude + ' ' + <br />
'Lon: ' + position.coords.longitude); <br />
} <br />
</script> <br />
<br />
</head> <br />
<body> <br />
<div> <br />
<button id="btnInit" >Find my location</button> <br />
</div> <br />
<br />
</body> <br />
</html> <br />
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-46317576380305824972012-07-31T23:44:00.001-07:002012-07-31T23:44:43.090-07:00simple pagination code in php and mysql<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<?php<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/*<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Place code to connect to your DB here.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>*/<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>// include your code to connect to DB.<br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$tbl_name="";<span class="Apple-tab-span" style="white-space: pre;"> </span>//your table name<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>// How many adjacent pages should be shown on each side?<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$adjacents = 3;<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/*<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> First get total number of rows in data table.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span> If you have a WHERE clause in your query, make sure you mirror it here.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>*/<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$query = "SELECT COUNT(*) as num FROM $tbl_name";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$total_pages = mysql_fetch_array(mysql_query($query));<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$total_pages = $total_pages[num];<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/* Setup vars for query. */<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$targetpage = "yourfilename.php"; <span class="Apple-tab-span" style="white-space: pre;"> </span>//your file name (the name of this file)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$limit = 2; <span class="Apple-tab-span" style="white-space: pre;"> </span>//how many items to show per page<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$page = $_GET['page'];<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($page)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$start = ($page - 1) * $limit; <span class="Apple-tab-span" style="white-space: pre;"> </span>//first item to display on this page<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$start = 0;<span class="Apple-tab-span" style="white-space: pre;"> </span>//if no page var is given, set start to 0<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/* Get data. */<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$sql = "SELECT column_name FROM $tbl_name LIMIT $start, $limit";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$result = mysql_query($sql);<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/* Setup page vars for display. */<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($page == 0) $page = 1;<span class="Apple-tab-span" style="white-space: pre;"> </span>//if no page var is given, default to 1.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$prev = $page - 1;<span class="Apple-tab-span" style="white-space: pre;"> </span>//previous page is page - 1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$next = $page + 1;<span class="Apple-tab-span" style="white-space: pre;"> </span>//next page is page + 1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$lastpage = ceil($total_pages/$limit);<span class="Apple-tab-span" style="white-space: pre;"> </span>//lastpage is = total pages / items per page, rounded up.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$lpm1 = $lastpage - 1;<span class="Apple-tab-span" style="white-space: pre;"> </span>//last page minus 1<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>/*<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>Now we apply our rules and draw the pagination object.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>We're actually saving the code to a variable in case we want to draw it more than once.<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>*/<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination = "";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($lastpage > 1)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination .= "<div class=\"pagination\">";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//previous button<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($page > 1)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$prev\">« previous</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<span class=\"disabled\">« previous</span>";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//pages<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($lastpage < 7 + ($adjacents * 2))<span class="Apple-tab-span" style="white-space: pre;"> </span>//not enough pages to bother breaking it up<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for ($counter = 1; $counter <= $lastpage; $counter++)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($counter == $page)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<span class=\"current\">$counter</span>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>elseif($lastpage > 5 + ($adjacents * 2))<span class="Apple-tab-span" style="white-space: pre;"> </span>//enough pages to hide some<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//close to beginning; only hide later pages<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if($page < 1 + ($adjacents * 2))<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for ($counter = 1; $counter < 4 + ($adjacents * 2); $counter++)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($counter == $page)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<span class=\"current\">$counter</span>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "...";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//in middle; hide some front and some back<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>elseif($lastpage - ($adjacents * 2) > $page && $page > ($adjacents * 2))<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=1\">1</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=2\">2</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "...";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for ($counter = $page - $adjacents; $counter <= $page + $adjacents; $counter++)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($counter == $page)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<span class=\"current\">$counter</span>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "...";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$lpm1\">$lpm1</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$lastpage\">$lastpage</a>";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//close to end; only hide early pages<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=1\">1</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=2\">2</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "...";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>for ($counter = $lastpage - (2 + ($adjacents * 2)); $counter <= $lastpage; $counter++)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($counter == $page)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<span class=\"current\">$counter</span>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$counter\">$counter</a>";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>//next button<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>if ($page < $counter - 1)<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<a href=\"$targetpage?page=$next\">next »</a>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>else<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "<span class=\"disabled\">next »</span>";<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>$pagination.= "</div>\n";<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
?><br />
<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><?php<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>while($row = mysql_fetch_array($result))<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>{<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>// Your while loop here<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>}<br />
<span class="Apple-tab-span" style="white-space: pre;"> </span>?><br />
<br />
<?php echo $pagination;?><br />
<span class="Apple-tab-span" style="white-space: pre;"> </span><br />
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-9822934731267753182012-07-31T23:13:00.001-07:002012-07-31T23:13:20.742-07:00send php mail with submit form data and file attachment<div dir="ltr" style="text-align: left;" trbidi="on">
<span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">careers.html</span><br />
<table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" width="100%"><tbody>
<tr><td><br /></td></tr>
<tr style="border-color: rgb(200, 200, 200); border-style: solid; border-width: 0px 1px; padding: 6px;"><td><div style="background-color: #e2e2e2; display: inline; float: right; position: relative; right: 0px;">
<div id="beacon_1e6a815fce" style="left: 0px; position: absolute; top: 0px; visibility: hidden;">
<img alt="" height="0" src="http://d1.openx.org/lg.php?bannerid=795776&campaignid=350866&zoneid=234963&loc=1&referer=http%3A%2F%2Fwww.weberdev.com%2Fget_example.php3%3FExampleID%3D4595&cb=1e6a815fce&r_id=753f0af839037494a053ac3d4ac1193c&r_ts=m82bu5" style="height: 0px; width: 0px;" width="0" /></div>
<div style="height: 0px; overflow: hidden; position: absolute; width: 0px;">
<img src="http://bid.openx.net/cm?wid=9fb527c8-d1cf-9f05-b007-18db4b3cd074" /></div>
</div>
<span style="color: black;"><html><span class="Apple-converted-space"> </span><br /><head><span class="Apple-converted-space"> </span><br /><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><span class="Apple-converted-space"> </span><br /><br /><br /><title>Untitled Document</title><span class="Apple-converted-space"> </span><br /></head><span class="Apple-converted-space"> </span><br /><br /><body style="padding:3px; margin:0px;" bgcolor="#FFFFFF"><span class="Apple-converted-space"> </span><br /><table cellpadding="0" cellspacing="0" border="0" width="440"><span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <tr><td style="height:10px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td colspan="2" style="text-align:justify; line-height:15px;" class="body"><span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <form name="frm" method="POST" action="careersuccess.php" enctype="multipart/form-data"><span class="Apple-converted-space"> </span><br /> <table cellpadding="0" cellspacing="0" border="0" width="100%"><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> Name</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><input type="text" name="strname" class="textfield"></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:3px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> Address</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><textarea cols="16" name="straddress"></textarea></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:3px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> City</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><input type="text" name="strcity" class="textfield"></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:3px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> State</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><input type="text" name="strstate" class="textfield"></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:3px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> Contact No</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><input type="text" name="strno" class="textfield"></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:3px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> Email</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><input type="text" name="stremail" class="textfield"></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:3px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> Comments</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><textarea cols="16" name="strcomments"></textarea></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:3px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td width="23%" class="body"> Resume</td><span class="Apple-converted-space"> </span><br /> <td width="3%" class="body">:</td><span class="Apple-converted-space"> </span><br /> <td width="74%"><input type="file" name="strresume"></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td style="height:10px"></td></tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td colspan="3" align="center"><span class="Apple-converted-space"> </span><br /> <input type="submit" value="Send" name="submit" onClick="return validate();"> <input type="reset" value="Reset" name="reset"><span class="Apple-converted-space"> </span><br /> </td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> </table> <span class="Apple-converted-space"> </span><br /> </form><span class="Apple-converted-space"> </span><br /><br /></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td colspan="2" align="center"> </td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> </table><span class="Apple-converted-space"> </span><br /></body><span class="Apple-converted-space"> </span><br /></html></span></td></tr>
<tr><td><br /></td></tr>
</tbody></table>
<br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">careersuccess.php</span><br style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" /><table bgcolor="#f5f4f4" border="0" cellpadding="0" cellspacing="0" style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; color: black; font-family: arial, verdana, helvetica, sans-serif; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;" width="100%"><tbody>
<tr><td><br /></td></tr>
<tr style="border-color: rgb(200, 200, 200); border-style: solid; border-width: 0px 1px; padding: 6px;"><td><div style="display: inline; float: right; position: relative; right: 0px;">
<ins style="border: none; display: inline-table; height: 280px; margin: 0px; padding: 0px; position: relative; visibility: visible; width: 336px;"><ins id="aswift_1_anchor" style="border: none; display: block; height: 280px; margin: 0px; padding: 0px; position: relative; visibility: visible; width: 336px;"></ins></ins><div id="beacon_0a44d62c18" style="left: 0px; position: absolute; top: 0px; visibility: hidden;">
<img alt="" height="0" src="http://d1.openx.org/lg.php?bannerid=677630&campaignid=316312&zoneid=234963&loc=1&referer=http%3A%2F%2Fwww.weberdev.com%2Fget_example.php3%3FExampleID%3D4595&cb=0a44d62c18&r_id=592bd54c0a7e9bf665efe274b05a6c63&r_ts=m82bu7" style="height: 0px; width: 0px;" width="0" /></div>
<div style="height: 0px; overflow: hidden; position: absolute; width: 0px;">
<img src="http://bid.openx.net/cm?wid=9fb527c8-d1cf-9f05-b007-18db4b3cd074" /></div>
</div>
<span style="color: black;"><span style="color: #0000bb;"><?php<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> $strname</span><span style="color: #007700;">=</span><span style="color: #0000bb;">ucfirst</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_REQUEST</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strname"</span><span style="color: #007700;">]);<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$straddress</span><span style="color: #007700;">=</span><span style="color: #0000bb;">ucfirst</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_REQUEST</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"straddress"</span><span style="color: #007700;">]);<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$strcity</span><span style="color: #007700;">=</span><span style="color: #0000bb;">ucfirst</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_REQUEST</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strcity"</span><span style="color: #007700;">]);<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$strstate</span><span style="color: #007700;">=</span><span style="color: #0000bb;">ucfirst</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_REQUEST</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strstate"</span><span style="color: #007700;">]); <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$phone</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$_REQUEST</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strno"</span><span style="color: #007700;">];<span class="Apple-converted-space"> </span><br /> if(</span><span style="color: #0000bb;">$phone<span class="Apple-converted-space"> </span></span><span style="color: #007700;">!=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">""</span><span style="color: #007700;">){<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$strno</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$phone</span><span style="color: #007700;">; } else {<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$strno</span><span style="color: #007700;">=</span><span style="color: #dd0000;">"-"</span><span style="color: #007700;">; } <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$stremail</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$_REQUEST</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"stremail"</span><span style="color: #007700;">]; <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$strcomments</span><span style="color: #007700;">=</span><span style="color: #0000bb;">ucfirst</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_REQUEST</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strcomments"</span><span style="color: #007700;">]);<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$filename</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$_FILES</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strresume"</span><span style="color: #007700;">][</span><span style="color: #dd0000;">"name"</span><span style="color: #007700;">];<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$filetype</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$_FILES</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strresume"</span><span style="color: #007700;">][</span><span style="color: #dd0000;">"type"</span><span style="color: #007700;">];<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$filesize</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$_FILES</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strresume"</span><span style="color: #007700;">][</span><span style="color: #dd0000;">"size"</span><span style="color: #007700;">];<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$filetemp</span><span style="color: #007700;">=</span><span style="color: #0000bb;">$_FILES</span><span style="color: #007700;">[</span><span style="color: #dd0000;">"strresume"</span><span style="color: #007700;">][</span><span style="color: #dd0000;">"tmp_name"</span><span style="color: #007700;">];<span class="Apple-converted-space"> </span><br /><br /><br /> <span class="Apple-converted-space"> </span><br /> if(</span><span style="color: #0000bb;">$filetype</span><span style="color: #007700;">==</span><span style="color: #dd0000;">"application/octet-stream"<span class="Apple-converted-space"> </span></span><span style="color: #007700;">or<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$filetype</span><span style="color: #007700;">==</span><span style="color: #dd0000;">"text/plain"<span class="Apple-converted-space"> </span></span><span style="color: #007700;">or<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$filetype</span><span style="color: #007700;">==</span><span style="color: #dd0000;">"application/msword"</span><span style="color: #007700;">)<span class="Apple-converted-space"> </span><br /> {<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$message</span><span style="color: #007700;">=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">'<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <table cellspacing="0" cellpadding="8" border="0" width="400"><span class="Apple-converted-space"> </span><br /> <tr><span class="Apple-converted-space"> </span><br /> <td colspan="2"></td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Name</strong></td><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strname</span><span style="color: #007700;">.</span><span style="color: #dd0000;">'</td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr><span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Address</strong></td><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$straddress</span><span style="color: #007700;">.</span><span style="color: #dd0000;">'</td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr><span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>City</strong></td><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strcity</span><span style="color: #007700;">.</span><span style="color: #dd0000;">'</td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr><span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>State</strong></td><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strstate</span><span style="color: #007700;">.</span><span style="color: #dd0000;">'</td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr><span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Contact No.</strong></td><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strno</span><span style="color: #007700;">.</span><span style="color: #dd0000;">'</td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr><span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Email</strong></td><span class="Apple-converted-space"> </span><br /> <td style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$stremail</span><span style="color: #007700;">.</span><span style="color: #dd0000;">'</td><span class="Apple-converted-space"> </span><br /> </tr><span class="Apple-converted-space"> </span><br /> <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr><span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;"><strong>Comments</strong></td><span class="Apple-converted-space"> </span><br /> </tr> <span class="Apple-converted-space"> </span><br /> <tr bgcolor="#eeeeee"><span class="Apple-converted-space"> </span><br /> <td colspan="2" style="font-family:Verdana, Arial; font-size:11px; color:#333333;">'</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strcomments</span><span style="color: #007700;">.</span><span style="color: #dd0000;">'</td><span class="Apple-converted-space"> </span><br /> </tr> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <tr><td colspan="2" style="padding:0px;"><img src="images/whitespace.gif" alt="" width="100%" height="1" /></td></tr><span class="Apple-converted-space"> </span><br /> </table><span class="Apple-converted-space"> </span><br /><br /><br /> <span class="Apple-converted-space"> </span><br /><br />'</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">// MAIL SUBJECT<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$subject<span class="Apple-converted-space"> </span></span><span style="color: #007700;">=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Mail with doc file attachment"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">// TO MAIL ADDRESS<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$to</span><span style="color: #007700;">=</span><span style="color: #dd0000;">"to@mail.com"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /></span><span style="color: #ff8000;">/*<span class="Apple-converted-space"> </span><br /> // MAIL HEADERS<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> $headers = "MIME-Version: 1.0\n";<span class="Apple-converted-space"> </span><br /> $headers .= "Content-type: text/html; charset=iso-8859-1\n";<span class="Apple-converted-space"> </span><br /> $headers .= "From: Name <name@name.com>\n";<span class="Apple-converted-space"> </span><br /><br />*/<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /><br /><br /> // MAIL HEADERS with attachment<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$fp<span class="Apple-converted-space"> </span></span><span style="color: #007700;">=<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">fopen</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$strresume</span><span style="color: #007700;">,<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"rb"</span><span style="color: #007700;">);<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$file<span class="Apple-converted-space"> </span></span><span style="color: #007700;">=<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">fread</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$fp</span><span style="color: #007700;">,<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$strresume_size</span><span style="color: #007700;">);<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$file<span class="Apple-converted-space"> </span></span><span style="color: #007700;">=<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">chunk_split</span><span style="color: #007700;">(</span><span style="color: #0000bb;">base64_encode</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$file</span><span style="color: #007700;">));<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$num<span class="Apple-converted-space"> </span></span><span style="color: #007700;">=<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">md5</span><span style="color: #007700;">(</span><span style="color: #0000bb;">time</span><span style="color: #007700;">());<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">//Normal headers<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"From: Name<name@name.com>\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"MIME-Version: 1.0\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Content-Type: multipart/mixed; "</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"boundary="</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$num</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"--</span><span style="color: #0000bb;">$num</span><span style="color: #dd0000;">\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">// This two steps to help avoid spam <span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$headers<span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Message-ID: <"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$now</span><span style="color: #007700;">.</span><span style="color: #dd0000;">" TheSystem@"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$_SERVER</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'SERVER_NAME'</span><span style="color: #007700;">].</span><span style="color: #dd0000;">">\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$headers<span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"X-Mailer: PHP v"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">phpversion</span><span style="color: #007700;">().</span><span style="color: #dd0000;">"\r\n"</span><span style="color: #007700;">; <span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">// With message<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$headers<span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Content-Type: text/html; charset=iso-8859-1\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers<span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Content-Transfer-Encoding: 8bit\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers<span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">""</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$message</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers<span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"--"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$num</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"\n"</span><span style="color: #007700;">; <span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">// Attachment headers<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Content-Type:"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strresume_type</span><span style="color: #007700;">.</span><span style="color: #dd0000;">" "</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"name=\""</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strresume_name</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"\"r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Content-Transfer-Encoding: base64\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"Content-Disposition: attachment; "</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"filename=\""</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$strresume_name</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"\"\r\n\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">""</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$file</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"\r\n"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> </span><span style="color: #0000bb;">$headers <span class="Apple-converted-space"> </span></span><span style="color: #007700;">.=<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">"--"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$num</span><span style="color: #007700;">.</span><span style="color: #dd0000;">"--"</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">// SEND MAIL<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /> </span><span style="color: #007700;">@</span><span style="color: #0000bb;">mail</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$to</span><span style="color: #007700;">,<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$subject</span><span style="color: #007700;">,<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$message</span><span style="color: #007700;">,<span class="Apple-converted-space"> </span></span><span style="color: #0000bb;">$headers</span><span style="color: #007700;">);<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span><br /><br /> </span><span style="color: #0000bb;">fclose</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$fp</span><span style="color: #007700;">);<span class="Apple-converted-space"> </span><br /><br /> echo<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">'<font style="font-family:Verdana, Arial; font-size:11px; color:#333333; font-weight:bold">Attachment has been sent Successfully.<br /></font>'</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br />}<span class="Apple-converted-space"> </span><br />else<span class="Apple-converted-space"> </span><br /> {<span class="Apple-converted-space"> </span><br /> echo<span class="Apple-converted-space"> </span></span><span style="color: #dd0000;">'<font style="font-family:Verdana, Arial; font-size:11px; color:#F3363F; font-weight:bold">Wrong file format. Mail was not sent.</font>'</span><span style="color: #007700;">;<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #ff8000;">//echo "<script>window.location.href='careers.html';</script>";<span class="Apple-converted-space"> </span><br /> <span class="Apple-converted-space"> </span></span><span style="color: #007700;">}<span class="Apple-converted-space"> </span><br /></span><span style="color: #0000bb;">?></span></span></td></tr>
</tbody></table>
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-62090258848546913972012-07-31T02:31:00.000-07:002012-07-31T02:31:05.107-07:00How to Use a PHP Session ,assign form values to session variable<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
A session is a way to store information (in the form of variables) to be used across multiple pages. Unlike a cookie, specific variable information is not stored on the users computer. It is also unlike other variables in the sense that we are not passing them individually to each new page, but instead retrieving them from the session we open at beginning of each page.<br />
<br />
Call this code mypage.php<br />
<br />
<?php<br />
// this starts the session<br />
session_start();<br />
<br />
// this sets variables in the session<br />
$_SESSION['color']='red';<br />
$_SESSION['size']='small';<br />
$_SESSION['shape']='round';<br />
print "Done";<br />
?><br />
<br />
The first thing we do with this code, is open the session using session_start(). We then set our first session variables (color, size and shape) to be red, small and round respectively.<br />
<br />
Just like with our cookies, the session_start() code must be in the header and you can not send anything to the browser before it. It's best to just put it directly after the <?php to avoid potential problems.<br />
<br />
So how will it know it's me? Most sessions set a cookie on your computer to uses as a key... it will look something like this: 350401be75bbb0fafd3d912a1a1d5e54. Then when a session is opened on another page, it scans your computer for a key. If there is a match, it accesses that session, if not it starts a new session for you.<br />
<br />
Now we are going to make a second page. We again will start with session_start() (we need this on every page) - and we will access the session information we set on our first page. Notice we aren't passing any variables, they are all stored in the session.<br />
<br />
Call this code mypage2.php<br />
<br />
<?php<br />
// this starts the session<br />
session_start();<br />
<br />
// echo variable from the session, we set this on our other page<br />
echo "Our color value is ".$_SESSION['color'];<br />
echo "Our size value is ".$_SESSION['size'];<br />
echo "Our shape value is ".$_SESSION['shape'];<br />
?><br />
<br />
All of the values are stored in the $_SESSION array, which we access here. Another way to show this is to simply run this code:<br />
<br />
<?php<br />
session_start();<br />
Print_r ($_SESSION);<br />
?><br />
<br />
You can also store an array within the session array. Let's go back to our mypage.php file and edit it slightly to do this:<br />
<br />
<?php<br />
session_start();<br />
<br />
// makes an array<br />
$colors=array('red', 'yellow', 'blue');<br />
// adds it to our session<br />
$_SESSION['color']=$colors;<br />
$_SESSION['size']='small';<br />
$_SESSION['shape']='round';<br />
print "Done";<br />
?><br />
<br />
Now let's run this on mypage2.php to show our new information:<br />
<br />
<?php<br />
session_start();<br />
Print_r ($_SESSION);<br />
echo "<p>";<br />
<br />
//echo a single entry from the array<br />
echo $_SESSION['color'][2];<br />
?><br />
<br />
<?php<br />
// you have to open the session to be able to modify or remove it<br />
session_start();<br />
<br />
// to change a variable, just overwrite it<br />
$_SESSION['size']='large';<br />
<br />
//you can remove a single variable in the session<br />
unset($_SESSION['shape']);<br />
<br />
// or this would remove all the variables in the session, but not the session itself<br />
session_unset();<br />
<br />
// this would destroy the session variables<br />
session_destroy();<br />
?><br />
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-34824560629676074392012-07-29T23:57:00.000-07:002012-07-29T23:57:38.982-07:00why use php for web development<div dir="ltr" style="text-align: left;" trbidi="on">
<br />
<b><span style="color: orange;">Open source</span></b>: PHP is a server side open source language which means it is available for free. It can be used on different platforms such as UNIX, Linux & Windows and considered the suitable language to develop dynamic sites.<br />
<br />
<span style="color: orange;"><b>Dynamic language</b></span>: PHP is used in close correlation with HTML for displaying dynamic data and other elements on a web page. The code available within the delimiters is parsed and all other information is ignored by PHP and sent directly to output.<br />
<br />
<span style="color: orange;"><b>Less use of resources</b></span>: PHP and the related procedures do not require too much from system resources. The processes and functions load as well as execute quickly since PHP makes use of Apache modules developed in C coding language.<br />
<br />
<b><span style="color: orange;">Dynamic CMS</span></b>: Development using PHP has made management of content on a web site very simple as entire content on the web site is kept in a database server and fetched by developers as and when required.<br />
<br />
<b>1. Ease of use</b><br />
<br />
As stated above, this language has proven to many, to be very easy to learn, very straight-forward. The language rules are not as strict as many common languages of now days, such as C++, Java etc. Any newcomer to the world of PHP will get the hang of this language very quickly on my opninion.<br />
<br />
<b>2. Integrates with HTML, CSS, javascript, ajax, jquery very well.</b><br />
<br />
When speaking of web development, there is no need to create workarounds to be able to display an HTML page when using PHP. All you have to do is place the HTML, CSS, js, etc… within the file and you are good to go.<br />
<br />
<b>3. Well documented</b><br />
<br />
Nothing is complete if it lacks documentation. This language contains their full manual online, and accessible to everyone in need of it. You need to learn something you have never done before? Just google it and you will definately find some crazy person that already went through the hassle for you, and is willing to help you out at the same time.<br />
<br />
<b>4. Great community</b><br />
<br />
Our communities are huge! The people have supported this language from the very start. Versed in every aspect, you can see how people strive to get more out of this simple language (yet powerful). This being open source, has the advantage that everyone can take a glance at it. That being said, with more exposure, the more opportunity this has of growing. Believe me, this has grown since the beggining, and it will keep growing.<br />
<br />
<b>5. Updated regularly (security etc, solid platform).</b><br />
<br />
Great technology needs to be updated constantly. The team at PHP.net have done a tremendous job in keeping their language up to date with all the bugs that have been found so far. Also, adding new features every once in a while to make our lives as programmers a bit much easier.<br />
<br />
<b>6. Database communication is excellent</b><br />
<br />
PHP is known to have a variety of database support. It has enough flavors to satisfy most individual needs. Here I found a list of supported databases so far. I’m not sure how accurate it is, but its good enough.<br />
<br />
http://phplens.com/adodb/supported.databases.html<br />
<br />
<b>7. Trend, a lot of people use it (widely used, for open source projects like WP, Joomla, PHPBB, etc.)</b><br />
<br />
This language has become very trendy. A lot of web developers prefer using PHP. (Note: I said a lot prefer, not all.) If you decide to start a new career path using PHP, then you will most certainly have a place to go. The job market is stacking with PHP developer roles, and PHP leads, etc. This is an actual fact, due to the reports from craigslist, stating that the job growth for PHP web developer has increased within the past year. Also, there are a lot of open source projects like WordPress, Joomla, Drupal to mention a few, and companies are using these more and more each day.<br />
<br />
<b>8. Usability</b><br />
<br />
One of the best things is that applications done within PHP are cross platform. They are indipendently ran on a server, and doesn’t matter what type of Operating system you are using, it is likely to run. In some cases you will just need to add a few conditions and manipulate the design a little bit, but having to create a new one from scratch, just because there is no compatibility, negatory!<br />
<br />
<b>9. Best of all, its free!</b><br />
<br />
You definately can’t go wrong with FREE! You know the old saying, “If it’s free, it’s for me!”. Some people prefer to pay for some web server, that will cost thousands of dollars to maintain up to date. Not with PHP though, you can install a free operating system (linux, unix), that is also very well documented, and have PHP installed in it, configured, and maintainable for much lower cost than any other type of OS.<br />
<br />
Some other features of PHP development include:<br />
<br />
Easy access to coding libraries<br />
Open source programming<br />
Availability of server interfaces<br />
Use of different databases such as Oracle, MySQL, PostgreSQL, etc<br />
Similarity to Java and C<br />
Platform compatibility<br />
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-92133914677610867602012-07-27T23:22:00.003-07:002012-07-27T23:22:42.416-07:00most useful array function in php<div dir="ltr" style="text-align: left;" trbidi="on">
<br /> <br />
<table border="1" bordercolor="#0000FF" cellpadding="1" cellspacing="1"> <tbody>
<tr> <td bgcolor="#0099CC" valign="top" width="211"> <div align="center">
<span><u>Function</u></span></div>
</td> <td bgcolor="#0099CC" valign="top" width="252"> <div align="center">
<span><b><u>Explanation</u></b></span></div>
</td> <td bgcolor="#0099CC" valign="top" width="300"> <div align="center">
<span><b><u>Example</u></b></span></div>
</td> </tr>
<tr> <td valign="top" width="211"> sizeof($arr)<br />
</td> <td valign="top" width="252"> This function returns the number of elements in an array.<br />
Use
this function to find out how many elements an array contains; this
information is most commonly used to initialize a loop counter when
processing the array.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("red", "green", "blue");<br /> <br /> echo "Array has " . sizeof($data) . " elements";<br /> ?><br /> <br /> Output:<br /> Array has 3 elements</span></td> </tr>
<tr> <td valign="top" width="211"> array_values($arr)<br />
</td> <td valign="top" width="252"> This
function accepts a PHP array and returns a new array containing only
its values (not its keys). Its counterpart is the array_keys()
function.<br />
Use this function to retrieve all the values from an associative array.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("hero" => "Holmes", "villain" => "Moriarty");<br />print_r(array_values($data));<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => Holmes<br /> [1] => Moriarty<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_keys($arr)<br />
</td> <td valign="top" width="252"> This
function accepts a PHP array and returns a new array containing only
its keys (not its values). Its counterpart is the array_values()
function.<br />
Use this function to retrieve all the keys from an associative array.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("hero" => "Holmes", "villain" => "Moriarty");<br />print_r(array_keys($data));<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => hero<br /> [1] => villain<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_pop($arr)<br />
</td> <td valign="top" width="252"> This function removes an element from the end of an array.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("Donald", "Jim", "Tom");<br />array_pop($data);<br />print_r($data);<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => Donald<br /> [1] => Jim<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_push($arr, $val)<br />
</td> <td valign="top" width="252"> This function adds an element to the end of an array.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("Donald", "Jim", "Tom");<br />array_push($data, "Harry");<br />print_r($data);<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => Donald<br /> [1] => Jim<br /> [2] => Tom<br /> [3] => Harry<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_shift($arr)<br />
</td> <td valign="top" width="252"> This function removes an element from the beginning of an array.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("Donald", "Jim", "Tom");<br />array_shift($data);<br />print_r($data);<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => Jim<br /> [1] => Tom<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_unshift($arr, $val)<br />
</td> <td valign="top" width="252"> This function adds an element to the beginning of an array.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("Donald", "Jim", "Tom");<br />array_unshift($data, "Sarah");<br />print_r($data);<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => Sarah<br /> [1] => Donald<br /> [2] => Jim<br /> [3] => Tom<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> each($arr)<br />
</td> <td valign="top" width="252"> This
function is most often used to iteratively traverse an array. Each
time each() is called, it returns the current key-value pair and moves
the array cursor forward one element. This makes it most suitable for
use in a loop.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("hero" => "Holmes", "villain" => "Moriarty");<br /> while (list($key, $value) = each($data)) {<br /> echo "$key: $value \n";<br /> }<br /> ?><br /> <br /> Output:<br /> hero: Holmes <br /> villain: Moriarty</span></td> </tr>
<tr> <td valign="top" width="211"> sort($arr)<br />
</td> <td valign="top" width="252"> This
function sorts the elements of an array in ascending order. String
values will be arranged in ascending alphabetical order. <br />
<i>Note: Other sorting functions include </i><i>asort</i><i>(</i><i>), arsort(), ksort(), krsort() and rsort()</i><i>.</i><br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("g", "t", "a", "s");<br /> sort($data);<br />print_r($data);<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => a<br /> [1] => g<br /> [2] => s<br /> [3] => t<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_flip($arr)<br />
</td> <td valign="top" width="252"> The function exchanges the keys and values of a PHP associative array.<br />
Use
this function if you have a tabular (rows and columns) structure in
an array, and you want to interchange the rows and columns.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("a" => "apple", "b" => "ball");<br />print_r(array_flip($data));<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [apple] => a<br /> [ball] => b<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_reverse($arr)<br />
</td> <td valign="top" width="252"> The function reverses the order of elements in an array.<br />
Use
this function to re-order a sorted list of values in reverse for
easier processing—for example, when you're trying to begin with the
minimum or maximum of a set of ordered values.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array(10, 20, 25, 60);<br />print_r(array_reverse($data));<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => 60<br /> [1] => 25<br /> [2] => 20<br /> [3] => 10<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_merge($arr)<br />
</td> <td valign="top" width="252"> This
function merges two or more arrays to create a single composite
array. Key collisions are resolved in favor of the latest entry.<br />
Use
this function when you need to combine data from two or more arrays
into a single structure—for example, records from two different SQL
queries.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data1 = array("cat", "goat");<br /> $data2 = array("dog", "cow");<br />print_r(array_merge($data1, $data2));<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => cat<br /> [1] => goat<br /> [2] => dog<br /> [3] => cow<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_rand($arr)<br />
</td> <td valign="top" width="252"> This function selects one or more random elements from an array.<br />
Use
this function when you need to randomly select from a collection of
discrete values—for example, picking a random color from a list.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("white", "black", "red");<br /> echo "Today's color is " . $data[array_rand($data)];<br /> ?><br /> <br /> Output:<br /> Today's color is red</span></td> </tr>
<tr> <td valign="top" width="211"> array_search($search, $arr)<br />
</td> <td valign="top" width="252"> This
function searches the values in an array for a match to the search
term, and returns the corresponding key if found. If more than one
match exists, the key of the first matching value is returned.<br />
Use this function to scan a set of index-value pairs for matches, and return the matching index.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("blue" => "#0000cc", "black" => "#000000", "green" => "#00ff00");<br /> echo "Found " . array_search("#0000cc", $data);<br /> ?><br /> <br /> Output:<br /> Found blue</span></td> </tr>
<tr> <td valign="top" width="211"> array_slice($arr, $offset, $length)<br />
</td> <td valign="top" width="252"> This
function is useful to extract a subset of the elements of an array,
as another array. Extracting begins from array offset $offset and
continues until the array slice is $length elements long.<br />
Use
this function to break a larger array into smaller ones—for example,
when segmenting an array by size ("chunking") or type of data.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array("vanilla", "strawberry", "mango", "peaches");<br />print_r(array_slice($data, 1, 2));<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => strawberry<br /> [1] => mango<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_unique($data)<br />
</td> <td valign="top" width="252"> This function strips an array of duplicate values.<br />
Use
this function when you need to remove non-unique elements from an
array—for example, when creating an array to hold values for a table's
primary key.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> $data = array(1,1,4,6,7,4);<br />print_r(array_unique($data));<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => 1<br /> [3] => 6<br /> [4] => 7<br /> [5] => 4<br /> )</span></td> </tr>
<tr> <td valign="top" width="211"> array_walk($arr, $func)<br />
</td> <td valign="top" width="252"> This function "walks" through an array, applying a user-defined function to every element. It returns the changed array.<br />
Use
this function if you need to perform custom processing on every
element of an array—for example, reducing a number series by 10%.<br />
</td> <td valign="top" width="300"><span class="code">Code:<br /> function reduceBy10(&$val, $key) {<br /> $val -= $val * 0.1;<br /> }<br /> <br /> $data = array(10,20,30,40);<br />array_walk($data, 'reduceBy10');<br />print_r($data);<br /> ?><br /> <br /> Output:<br /> Array<br /> (<br /> [0] => 9<br /> [1] => 18<br /> [2] => 27<br /> [3] => 36<br /> )</span></td></tr>
</tbody></table>
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com0tag:blogger.com,1999:blog-4493856116928207359.post-78618329911689911822012-07-25T22:13:00.003-07:002015-08-18T04:19:02.928-07:00disable f12 key javascript<div dir="ltr" style="text-align: left;" trbidi="on">
use this code to head tag<br />
<br />
<br />
<script language="JavaScript"><br /><br />//////////F12 disable code////////////////////////<br /> document.onkeypress = function (event) {<br /> event = (event || window.event);<br /> if (event.keyCode == 123) {<br /> //alert('No F-12');<br /> return false;<br /> }<br /> }<br /> document.onmousedown = function (event) {<br /> event = (event || window.event);<br /> if (event.keyCode == 123) {<br /> //alert('No F-keys');<br /> return false;<br /> }<br /> }<br />document.onkeydown = function (event) {<br /> event = (event || window.event);<br /> if (event.keyCode == 123) {<br /> //alert('No F-keys');<br /> return false;<br /> }<br /> }<br />/////////////////////end///////////////////////<br />
</script></div>
<a target="_blank" href="http://www.amazon.in/b?_encoding=UTF8&camp=3626&creative=24790&linkCode=ur2&node=1983396031&site-redirect=&tag=gwebsolutionb-21">Shoes</a><img src="http://ir-in.amazon-adsystem.com/e/ir?t=gwebsolutionb-21&l=ur2&o=31" width="1" height="1" border="0" alt="" style="border:none !important; margin:0px !important;" />
<div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com28tag:blogger.com,1999:blog-4493856116928207359.post-89280024989334422632012-07-25T04:25:00.000-07:002012-07-25T04:25:09.909-07:00Disable Ctrl Key, Right click and F12<div dir="ltr" style="text-align: left;" trbidi="on">
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: 'Trebuchet MS', sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; padding: 5px 10px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Hi ,</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: 'Trebuchet MS', sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; padding: 5px 10px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
Just copy and paste this code and save your file.</div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: 'Trebuchet MS', sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; padding: 5px 10px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<br /></div>
<div style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: 'Trebuchet MS', sans-serif; font-size: 10pt; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; margin: 0px; orphans: 2; padding: 5px 10px; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px;">
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><br /><html xmlns="http://www.w3.org/1999/xhtml"><br /><head><br /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><br /><title>Disable Ctrl Key, Right click and F12 </title><br /><script language="JavaScript"><br /><br />//////////F12 disable code////////////////////////<br /> document.onkeypress = function (event) {<br /> event = (event || window.event);<br /> if (event.keyCode == 123) {<br /> //alert('No F-12');<br /> return false;<br /> }<br /> }<br /> document.onmousedown = function (event) {<br /> event = (event || window.event);<br /> if (event.keyCode == 123) {<br /> //alert('No F-keys');<br /> return false;<br /> }<br /> }<br />document.onkeydown = function (event) {<br /> event = (event || window.event);<br /> if (event.keyCode == 123) {<br /> //alert('No F-keys');<br /> return false;<br /> }<br /> }<br />/////////////////////end///////////////////////<br /><br /><br />//Disable right click script <br />//visit http://www.rainbow.arch.scriptmania.com/scripts/ <br />var message="Sorry, right-click has been disabled"; <br />/////////////////////////////////// <br />function clickIE() {if (document.all) {(message);return false;}} <br />function clickNS(e) {if <br />(document.layers||(document.getElementById&&!document.all)) { <br />if (e.which==2||e.which==3) {(message);return false;}}} <br />if (document.layers) <br />{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;} <br />else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;} <br />document.oncontextmenu=new Function("return false") <br />// <br />function disableCtrlKeyCombination(e)<br />{<br />//list all CTRL + key combinations you want to disable<br />var forbiddenKeys = new Array('a', 'n', 'c', 'x', 'v', 'j' , 'w');<br />var key;<br />var isCtrl;<br />if(window.event)<br />{<br />key = window.event.keyCode; //IE<br />if(window.event.ctrlKey)<br />isCtrl = true;<br />else<br />isCtrl = false;<br />}<br />else<br />{<br />key = e.which; //firefox<br />if(e.ctrlKey)<br />isCtrl = true;<br />else<br />isCtrl = false;<br />}<br />//if ctrl is pressed check if other key is in forbidenKeys array<br />if(isCtrl)<br />{<br />for(i=0; i<forbiddenKeys.length; i++)<br />{<br />//case-insensitive comparation<br />if(forbiddenKeys[i].toLowerCase() == String.fromCharCode(key).toLowerCase())<br />{<br />alert('Key combination CTRL + '+String.fromCharCode(key) +' has been disabled.');<br />return false;<br />}<br />}<br />}<br />return true;<br />}<br /></script><br /></head><br /><body onkeypress="return disableCtrlKeyCombination(event);" onkeydown="return disableCtrlKeyCombination(event);"><br />Press ctrl and you can check various key is disable with CTRL. like — 'a', 'n', 'c', 'x', 'v', 'j' , 'w' Just add key in above the array and disable key as you want.<br /></body><br /></html> </div>
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com38tag:blogger.com,1999:blog-4493856116928207359.post-46788215932138070572012-07-24T23:05:00.000-07:002012-07-24T23:06:02.287-07:00disable past dates in datepicker jquery<div dir="ltr" style="text-align: left;" trbidi="on">
<div dir="ltr" style="text-align: left;" trbidi="on">
<span class="axero-entity-formatted-content" id="inner">In this blog I
will show you how to disable all the past dates (less than or older than
today) of jQuery Datepicker. To accomplish it I have used the <b>minDate </b>property of the jQuery datepicker and set it to current date to make that happen.</span><br />
<br />
<script type="text/javascript"><br /> $(function () {<br />var date = new Date();<br />var currentMonth = date.getMonth();<br />var currentDate = date.getDate();<br />var currentYear = date.getFullYear();<br />$('#deliveron').datepicker({<br />minDate: new Date(currentYear, currentMonth, currentDate)<br /><br />});<br />}); <br /> <br /> </script></div>
<title></title>
<link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/themes/base/jquery-ui.css" media="all" rel="stylesheet" type="text/css"></link>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js" type="text/javascript">
</script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.6/jquery-ui.min.js" type="text/javascript">
</script>
<script type="text/javascript">
$(function () {
var date = new Date();
var currentMonth = date.getMonth();
var currentDate = date.getDate();
var currentYear = date.getFullYear();
$('#<%= txtDate.ClientID %>').datepicker({
minDate: new Date(currentYear, currentMonth, currentDate)
});
});
</script>
<br />
<form id="form1" runat="server">
<asp:textbox id="txtDate" runat="server"></asp:textbox>
</form>
</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com1tag:blogger.com,1999:blog-4493856116928207359.post-82710153061515792792012-07-24T22:42:00.000-07:002012-07-24T22:42:21.518-07:00Adding label tabs to navigation bar<div dir="ltr" style="text-align: left;" trbidi="on">
1. Label your posts.<br />
Label your posts according to subjects or categories (if you haven’t by
now done so). This is pretty basic, However, if you don’t have the sligh<a href="http://www.howtotipsandtrick.blogspot.com/">t</a>est thought what a label is or don’t know how to apply it, read How do I label my posts?.<br />
<br />
You can also apply a label to multiple posts at once.<br />
<br />
<b>2. Now get the label URL</b>.<br />
You can get the URL to a label-search page by right-clicking on the
hyper-linked label. in Chrome select “Copy link address”, and if you are
using Interne<a href="http://www.howtotipsandtrick.blogspot.com/">t</a> Explorer, select “Properties” and copy the link from there.<br />
You can usually find the labels at the bottom of your post and in Labels
gadget if you have a Labels gadget installed. If you don’t see any
label, you can always construct the URL yourself.<br />
<br />
<b>A URL follows the format below:</b><br />
http://YOURBLOGNAME howtotipsandtrick.blogspot.com/search/label/YOURLABEL PCTools<br />
For a multiple word label such as "YOUR LABEL", you need to replace the
space between words with %20, like so: YOUR%20LABEL. Labels are case
sensitive; make sure you enter the correct letter case.<br />
<br />
<b>Example</b>:<br />
This is the URL for BloggerSentral’s “SEO and traffic” label. Clicking
it will take you to a page showing all posts that fall under that label
(opens in new tab/window):<br />
http://www.bloggersentral.com/search/label/SEO%20and%20traffic<br />
<br />
<b>3. Add the tab with the label URL</b><br />
The technique of adding the tab is different depending on the type of widget used for the horizontal navigation bar.<br />
<br />
To add the tab to the Pages gadget, follow this tutorial: Adding non-page links to Pages/PageList gadget.<br />
If your tab uses a LinkList gadget, enter the URL into “New Site URL” text box</div><div class="blogger-post-footer">http://feeds.feedburner.com/blogspot/JJiUd</div>PHP Web Solutionhttp://www.blogger.com/profile/14969631240324205385noreply@blogger.com1