php Sessions code


Php Sessions


Sessions are used to help maintain the values of variables
across multiple web pages. This is done by creating a unique
 session ID that is sent to the client browser. The browser
 then sends the unique ID back on each page request and
 PHP uses the ID to fetch the values of all the variables
associated with this session.


The session ID is sent back and forth in a cookie or in the URL.
By default, PHP tries to use cookies, but if the browser has
disabled cookies.








PHP falls back to putting the ID in the URL. The php.ini directives that affect this are:

session.use_cookies
When on, PHP will try to use cookies

session.use_trans_sid
When on, PHP will add the ID to URLs if cookies are not used

The trans_sid code in PHP is rather interesting. It actually parses the entire HTML file and modifies/mangles every link and form to add the session ID. The url_rewriter.tags php.ini directive can change how the various elements are mangled.

Writing an application that uses sessions is not hard. You start a session using session_start( ), then register the variables you wish to associate with that session. For example:

<?php
  session_start( );
  session_register('foo');
  session_register('bar');

  $foo = "Hello";
  $bar = "World";
?>

If you put the previous example in a file named page1.php and load it in your browser, it sends you a cookie and stores the values of $foo and $bar on the server. If you then load this page2.php page:

<?php
  session_start( );
  echo "foo = $_SESSION[foo]<br />";
  echo "bar = $_SESSION[bar]<br />";
?>
You should see the values of $foo and $bar set in page1.php. Note the use of the $_SESSION superglobal. If you have register_globals on, you would be able to access these as $foo and $bar directly.

You can add complex variables such as arrays and objects to sessions as well. The one caveat with putting an object in a session is that you must load the class definition for that object before you call session_start( ).

A common error people make when using sessions is that they tend to use it as a replacement for authentication -- or sometimes as an add-on to authentication. Authenticating a user once as he first enters your site and then using a session ID to identify that user throughout the rest of the site without further authentication can lead to a lot of problems if another person is somehow able to get the session ID. There are a number of ways to get the session ID:

If you are not using SSL, session IDs may be sniffed

If you don't have proper entropy in your session IDs, they may be guessed

If you are using URL-based session IDs, they may end up in proxy logs

If you are using URL-based session IDs, they may end up bookmarked on publicly-accessible computers

All Operators Of PHP

 

All PHP Operators

 An expression is the basic building block of the language.
Anything with a value can be thought of as an expression. Examples include:

5
5+5
$a
$a==5
sqrt(9)
By combining many of these basic expressions, you can build larger, more complex expressions.

Note that the echo statement we've used in numerous examples cannot be part of a complex expression because it does not have a return value. The print statement, on the other hand, can be used as part of complex expression -- it does have a return value. In all other respects, echo and print are identical: they output data.




Expressions are combined and manipulated using operators. The following table lists the operators from highest to lowest precedence; the second column (A) shows the operators' associativity. These operators should be familiar to you if you have any C, Java, or Perl experience.

Operators
A
!, ~, ++, --, @, (the casting operators)
Right
*, /, %
Left
+, -, .
Left
<<, >>
Left
<, <=, >=, >
Nonassociative
==, !=, ===, !==
Nonassociative
&
Left
^
Left
|
Left
&&
Left
||
Left
? : (conditional operator)
Left
=, +=, -=, *=, /=, %=, ^=, .=, &=, |=, <<=, >>=
Left
AND
Left
XOR
Left
OR
Left

Variables in PHP


Variables in PHP

Variables are used for storing a values, like text strings, numbers or arrays.
When a variable is set it can be used over and over again in your script
All variables in PHP start with a $ sign symbol.
The correct way of setting a variable in PHP:



<?php
$txp = "test";
$no = 18;
?>

PHP here are  three different variable scopes:

    local
    global
    static

Variable Naming Rules

  • A variable name must start with a letter or an underscore "_"
  • A variable name can only contain alpha-numeric characters and underscores (a-Z, 0-9, and _ )
  • A variable name should not contain spaces. If a variable name is more than one word, it should be separated with underscore ($my_string), or with capitalization ($myString)






PHP Array Introduction


Function Description PHP


 Testing Array and sizeof( )
<?php
$fixture = Array( );
// $fixture is expected to be empty.

$fixture[] = "element";
// $fixture is expected to contain one element.
?>


A really simple way to check whether we are getting the results we expect is to print the result of sizeof( ) before and after adding the element

array() Creates an array 
array_change_key_case() Returns an array with all keys in lowercase or uppercase
array_chunk() Splits an array into chunks of arrays 
array_combine() Creates an array by using one array for keys and another for its values 
array_count_values() Returns an array with the number of occurrences for each value
array_diff() Compares array values, and returns the differences
array_diff_assoc() Compares array keys and values, and returns the differences 
array_diff_key() Compares array keys, and returns the differences 
array_diff_uassoc() Compares array keys and values, with an additional user-made function check, and returns the differences 
array_diff_ukey() Compares array keys, with an additional user-made function check, and returns the differences 
array_fill() Fills an array with values 
array_filter() Filters elements of an array using a user-made function 
array_flip() Exchanges all keys with their associated values in an array 
array_intersect() Compares array values, and returns the matches 
array_intersect_assoc() Compares array keys and values, and returns the matches 
array_intersect_key() Compares array keys, and returns the matches 
array_intersect_uassoc() Compares array keys and values, with an additional user-made function check, and returns the matches 
array_intersect_ukey() Compares array keys, with an additional user-made function check, and returns the matches 
array_key_exists() Checks if the specified key exists in the array 
array_keys() Returns all the keys of an array 
array_map() Sends each value of an array to a user-made function, which returns new values 4
array_merge() Merges one or more arrays into one array 
array_merge_recursive() Merges one or more arrays into one array 
array_multisort() Sorts multiple or multi-dimensional arrays 
array_pad() Inserts a specified number of items, with a specified value, to an array 
array_pop() Deletes the last element of an array 
array_product() Calculates the product of the values in an array 
array_push() Inserts one or more elements to the end of an array 
array_rand() Returns one or more random keys from an array 
array_reduce() Returns an array as a string, using a user-defined function 
array_reverse() Returns an array in the reverse order 
array_search() Searches an array for a given value and returns the key 
array_shift() Removes the first element from an array, and returns the value of the removed element 
array_slice() Returns selected parts of an array 
array_splice() Removes and replaces specified elements of an array 
array_sum() Returns the sum of the values in an array 
array_udiff() Compares array values in a user-made function and returns an array 
array_udiff_assoc() Compares array keys, and compares array values in a user-made function, and returns an array 
array_udiff_uassoc() Compares array keys and array values in user-made functions, and returns an array 
array_uintersect() Compares array values in a user-made function and returns an array 
array_uintersect_assoc() Compares array keys, and compares array values in a user-made function, and returns an array 
array_uintersect_uassoc() Compares array keys and array values in user-made functions, and returns an array 
array_unique() Removes duplicate values from an array 
array_unshift() Adds one or more elements to the beginning of an array 
array_values() Returns all the values of an array 
array_walk() Applies a user function to every member of an array 
array_walk_recursive() Applies a user function recursively to every member of an array 
arsort() Sorts an array in reverse order and maintain index association 
asort() Sorts an array and maintain index association 
compact() Create array containing variables and their values
count() Counts elements in an array, or properties in an object 
current() Returns the current element in an array 
each() Returns the current key and value pair from an array 
end() Sets the internal pointer of an array to its last element 
extract() Imports variables into the current symbol table from an array 
in_array() Checks if a specified value exists in an array
key() Fetches a key from an array
krsort() Sorts an array by key in reverse order
ksort() Sorts an array by key 
list() Assigns variables as if they were an array 
natcasesort() Sorts an array using a case insensitive "natural order" algorithm 

natsort() Sorts an array using a "natural order" algorithm 
next() Advance the internal array pointer of an array 
pos() Alias of current() 
prev() Rewinds the internal array pointer 
range() Creates an array containing a range of elements 
reset() Sets the internal pointer of an array to its first element
rsort() Sorts an array in reverse order
shuffle() Shuffles an array 
sizeof() Alias of count()
sort() Sorts an array 
uasort() Sorts an array with a user-defined function and maintain index association
uksort() Sorts an array by keys using a user-defined function
usort() Sorts an array by values using a user-defined function 

The most important players for Web multimedia

important players for Web multimedia



Real Networks RealPlayer:RealPlayer is a plug-in for
real-time playback of audio and video files that works
 pretty darn well. The user of a RealAudioenhanced
Web site typically clicks a link to get an audio or a video clip.
Areasonably brief pause ensues while an initial part of the
 file downloads,and then sound or a video clip starts playing.
The file isstreamedin realtime, meaning that no big file is stored
 on the user’s hard disk.





Windows Media Player:Microsoft is trying to take back
the multimedia player lead from Real with its own, similar
 offering. Windows MediaPlayer supports most of the
 same formats as RealPlayer and comes bundled with
 just about every PC. However, RealPlayer is now
 moving ahead with deals with Apple for QuickTime
 interoperability, so Windows Media Player may
 still be playing catch-up for awhile.

Apple QuickTime:QuickTime is Apple’s multimedia
technology that hasbecome the industry standard for
 video editing and high-quality video playback on computers.
 QuickTime VR is an offshoot of QuickTime that
creates high-resolution virtual reality panoramas and objects.
 MostQuickTime content is not streamed; users have
 to wait until some or the entire file downloads before
 it will play back. Although this reduces immediacy,
it allows improved quality and greater flexibility for the user.

Macromedia ShockWave/Flash:The ShockWave plug-in
 allows presentations and experiences created in Macromedia
Director to be played back over the Web. Figuring out
Director is no mean feat, but luckily you don’tneed to understand
 Director in order to use the powerful ShockWave
tool, which delivers multimedia experiences over the Web.
Flash is asimple format for delivering animations in your
Web page and is rapidly
becoming popular.

Article Marketing On Internet - online

Article Marketing Tips Online Internet

Article writing is an efficient marketing tool
 for your business if done properly. It’s
another great way to establish a powerful
online presence. However, it’s extremely
important that you write a good piece of
 content for your article to promote your
business.

In the past, article directories used to get a high
volume of web traffic and were considered highly
reputable websites by the search engines. This ensured substantial
free traffic through submitted articles on these websites.



The recent changes in Google algorithms has negatively
 affected the article directories as many have been marked
 as content farms with no real value. However, this doesn’t
reduce the value of informative and well written content.
 There are still many article directories that have a lot
of authority and many online marketers make a full-time living
just writing articles for these directories.

SEO marketing tips
seo marketing youtube
seo marketing news
blog marketing fanda
Internet marketing
ecommerce product’s marketing tips
internet marketing strategy
Tips of Internet Marketing
Search Engine Marketing Metrics
Social media marketing
High-Traffic FREE article submission websites
Facebook Marketing tips 
 
You should avoid submitting your articles to low-ranking
 article directories and concentrate on sites like Zimbio.com,
 EzineArticles.com, GoArticles.comand Squidoo.com.
Before submitting your article to multiple high-ranking article directories,
you should rewrite your article and try to make it 30% to 50% unique. 

How to growing traffic of a website

Growing traffic of a website-Tips

If you want to stay on top of the search results you have
 to stay focused on generating compelling content.
 Adding content on your website and getting backlinks to various
pages is important. Here is a list of what needs to be done in order to ensure
continuously growing traffic:
• Keep adding articles/ content on your site
• Write articles on other blogs
• Comment on related sites and blogs
• Post videos on sites like YouTube and link them to your site
• Share your content on social networking sites so that more people from your
community know about it
• Generate discussions and activity on your site
Remember, content is not just the text you add but also what your visitors add to your
site as well. You may have noticed that on several blogs/ sites, visitors' comments also
appear in search results.


If the content you are presenting is interesting, chances are that you will have returning
traffic which might bring along their entire social community to your site. This increases
traffic related to your niche.
Attract targeted traffic to your site
does website traffic help seo
Seoo Traffic Sources
Traffic to Your Site
Additional SEO tips-increase traffic
Use Email Newsletters for traffic 
Off-Page SEO Strategies 
seo marketing - strategies-tips

seo tips for blogs

 Seo Articles Targeted Clients
Element 5 ways to help seo Best seo Tips And Tricks Content Will Still Reign as King seo strategies Web Position seo Content seo and HTML Description Tags on Your Website HTML-language of the web web development Semantic Markup for seo Time consuming process in seo Robots.txt Optimization Link Building Guide Keywords in URLs and File Names Four Money-Making seo Tips


Optimize Your Site for Speed 
Search Ranking Algorithm-Social sharing data
Security issue for sitemap SEO?
What SEO tools do you use?
Black Hat SEO?
Business With SEO 

Plan out your SEO strategies
Bing Webmaster-seo-tools
SEO Success Factors
20 best websites to create free blogs
seo marketing news
Seo Fuel
Advanced Techniques for SEO
enabled SEO in Opencart
Site Indexation Tool
internet marketing tips 
Seo friends
Best Marketing SEO
Root Domains, Subdomains, and Microsites
Seo algorithm
Free SEO Analysis Tools

Hosting-top 50 free web hosting site With thousands

top 50 free web hosting site

Google Cloud Computing and Hosting
Making Money by Hosting Advertising
Free Hosting 
shared hosting, dedicated servers and vps hosting if you are looking for cheap vps hosting, hostforweb is your best choice, offering fully managed vps, cpanel vps hosting and linux vps hosting
http://www.godaddy.com/hosting/vps-hosting.aspx 
http://vps.net 

https://www.ovh.co.uk/vps
 http://www.hostgator.com/vps-hosting 
 http://www.vpspecialists.co.uk
 http://www.dreamhost.com/servers/vps 
http://glistenworld.com 
 http://domain-seller.biz 
http://xanaresellerhosting.com 
http://www.micfo.com 


http://buyurl.net 
http://physicaltherapycptcodes.com 
http://www.bulkmailserverindia.com  

With thousands of web hosting services from companies available today, the choice of a web hosting service to signed contract with, can be a difficult experience. It is not as easy as going to a store and buy something. For 

Top WALKINS IN APRIL 2015

 

Top MNC WALKINS IN APRIL 2015

Trigent Walkins View Walkin Details
TCS Walkins View Walkin Details
HCL Walkins View Walkin Details
FCS Walkins View Walkin Details
MphasiS Walkins View Walkin Details
PCS Walkins View Walkin Details
Dell Walkins View Walkin Details
Wipro Walkins View Walkin Details
Emerson Walkins View Walkin Details
Reliance Walkins View Walkin Details
Intel Walkins View Walkin Details
Symantec Walkins View Walkin Details
Sasken Walkins View Walkin Details
Aricent Walkins View Walkin Details
HCL Walkins View Walkin Details
EMC Walkins View Walkin Details
CMC Walkins View Walkin Details
CONVERGYS Walkins View Walkin Details
Larsen and Toubro Walkins View Walkin Details
Symphony Walkins View Walkin Details
PCS Technology Walkins View Walkin Details
HCL Walkins View Walkin Details
MphasiS Walkins View Walkin Details
TCS Walkins View Walkin Details
Tata Capital Financial Walkins View Walkin Details
American Express Walkins View Walkin Details
Videocon Walkins View Walkin Details
Randstad Walkins View Walkin Details
Amazon Walkins View Walkin Details
TCS Walkins View Walkin Details
Intel Walkins View Walkin Details
Toshiba Walkins View Walkin Details
TATA Walkins View Walkin Details
Novartis Walkins View Walkin Details
Vodafone Walkins View Walkin Details
HCL Walkins View Walkin Details
Growel Softech Walkins View Walkin Details
Hector & Streak Walkins View Walkin Details
HCL Walkins View Walkin Details
TCS Walkins View Walkin Details
Rolta Walkins View Walkin Details
Acculogix Software Walkins View Walkin Details
HCL Walkins View Walkin Details
Godrej Walkins View Walkin Details
SmartPlay Walkins View Walkin Details
Sasken Walkins View Walkin Details
Subex Walkins View Walkin Details
JPMorgan walkins View Walkin Details
ITC Infotech Walkins View Walkin Details
Amazon Walkins View Walkin Details
Tata Consultancy Walkins View Walkin Details
CSC Walkins View Walkin Details
Aegis Walkins View Walkin Details
Genpact walkins View Walkin Details
Quinnox Walkins View Walkin Details
WIPRO Walkins View Walkin Details
HCL Technologies Walkins View Walkin Details
CSC India Walkins View Walkin Details
Cognizant Walkins View Walkin Details
Wipro Walkins View Walkin Details
HCL Walkins View Walkin Details
Unisys Walkins View Walkin Details
IDC Walkins View Walkin Details
HCL Walkins View Walkin Details
Ernst Young Walkins View Walkin Details
HCL Technologies Walkins View Walkin Details
Firstsource Walkins View Walkin Details
Tata Consultancy Services Walkins View Walkin Details
Tech Mahindra Walkins View Walkin Details
Wipro BPO Solutions Walkins View Walkin Details
Genpact Walkins View Walkin Details
HCL-Technologies Walkins View Walkin Details
Info Edge India Walkins View Walkin Details
CBSI India Walkins View Walkin Details
HTC Global Services Walkins View Walkin Details
HCL-Technologies Walkins View Walkin Details
Aricent-Technologies Walkins View Walkin Details
ITC-Infotech Walkins View Walkin Details
Sify LimitedWalkins View Walkin Details
Tech MahindraWalkins View Walkin Details
NTT Global Delivery Walkins View Walkin Details
Mahindra Walkins View Walkin Details
HCL Walkins View Walkin Details
Wipro Walkins View Walkin Details
FIS Walkins View Walkin Details
Accenture Walkins View Walkin Details
L&T Walkins View Walkin Details
Mahindra Walkins View Walkin Details
Accenture Walkins View Walkin Details
Virtusa Walkins View Walkin Details
Amazon Walkins
HDFC Walkins View Walkin Details
HCL Walkins View Walkin Details
Oracle Walkins View Walkin Details
Reliance Walkins View Walkin Details
Sasken  Walkins View Walkin Details
HCL  Walkins View Walkin Details
CSC  Walkins View Walkin Details
Accenture  Walkins View Walkin Details
Philips  Walkins View Walkin Details
Infosys  Walkins View Walkin Details
Oracle  Walkins View Walkin Details
IBM  Walkins View Walkin Details
HP Walkins View Walkin Details
FIS Walkins View Walkin Details
Qualcomm Walkins View Walkin Details
CSS Walkins View Walkin Details
IGATE Walkins View Walkin Details
Aricent Walkins View Walkin Details
Syntel Walkins View Walkin Details
L&T  Walkins View Walkin Details
Symphony Walkins View Walkin Details
Huawei  Walkins View Walkin Details
Wipro Walkins View Walkin Details
Capgemini Walkins View Walkin Details
Tech-Mahindra  Walkins View Walkin Details
Amazon  Walkins View Walkin Details
Hewlett-Packard Walkins View Walkin Details
Honeywell Walkins View Walkin Details
Flextronics Walkins View Walkin Details
Mindtree Walkins View Walkin Details
Mahindra Walkins View Walkin Details
ADP Walkins View Walkin Details
TCS Walkins View Walkin Details
Bosch Walkins View Walkin Details
Deloitte Walkins View Walkin Details
Intel Walkins View Walkin Details
HTC Walkins View Walkin Details
EMC Walkins View Walkin Details
KPIT Walkins View Walkin Details
Emerson Walkins View Walkin Details
TIBCO Walkins View Walkin Details
Cognizant Walkins View Walkin Details
Alcatel Walkins View Walkin Details
SAP Walkins View Walkin Details
Sasken Walkins View Walkin Details
Calsoft Walkins View Walkin Details
TESCO Walkins View Walkin Details
Philips Walkins View Walkin Details
MphasiS Walkins View Walkin Details
Vodafone Walkins View Walkin Details
Persistent Walkins View Walkin Details
Adobe Walkins View Walkin Details
Symbiosis Walkins View Walkin Details
Maersk Walkins View Walkin Details
Sapient Walkins View Walkin Details
Symantec Software Walkins View Walkin Details