PHP-Http Environment Variables



A Web browser makes a request of a Web server, it sends along with
 the request a list of extra variables. These are called environment
 variables, and they can be very useful for displaying dynamic
content or authorizing users.

The phpinfo function displays a wealth of information about your Web
 server software and the version of PHP you are running, in addition
to the basic HTTP environment.



<?php  phpinfo(); ?>



Save the file with the name phpinfo.php and place this file in the
document root of your Web server.

Open your Web browser and type http://127.0.0.1/phpinfo.php


Retrieving and Using REMOTE_ADDR
By default, environment variables are available to PHP scripts
as $VAR_NAME. For example, the REMOTE_ADDR environment variable is
already contained as $REMOTE_ADDR. However, to be absolutely sure
that you're reading the correct value, use the getenv function
to assign a value to a variable of your choice.

The REMOTE_ADDR environment variable contains the IP address of the
 machine making the request. Let's get the value of your REMOTE_ADDR.

Open a new file in your text editor.

Open a PHP block, then use getenv to place the value of REMOTE_ADDR
 in a variable called $address:

<?
$address = getenv("REMOTE_ADDR");

//Print the value of $address to the screen.

echo "Your IP address is $address.";
?>

Save the file with the name testaddress.php, then place this file in the
 document root of your Web server.

Open your Web browser and type http://127.0.0.1/testaddress.php



PHP-HTTP_USER_AGENT
<?
$agent = getenv("HTTP_USER_AGENT");

Print the value of $agent to the screen,

echo " You are using $agent.";
?>


 HTTP Headers

An HTTP - HyperText Transfer Protocol header is used to send information
 back and forth between the server and the client the Web browser.
 Normally this information is in the form of HTML, which is why
the address for Web pages begins with http://.

To redirect the user's browser with PHP, the code:

header("Location: page.php");

You can also use the header function to send cookies, which is a
good backup to the setcookie function which sometimes has
inconsistent results from one browser to the next.

But HTTP headers are a complicated enough subject to warrant a little more
attention. There are actually dozens upon dozens of uses for HTTP headers,
 all of which you can take advantage of using PHP's header function.

PHP Functions
Php tutorial - imagemagick
php.ini Basics
PHP Sessions
Cookies Versus Sessions
PHP Web-Related Variables
PHP ERRORS
maximum size of a file uploaded
Php Image upload
php file_get_contents
MySQL Data on the Web
What are GET and POST
php and pdf
$_ENV and $_SERVER
PEAR with php
SELECTING DATA PHP
prevent hijacking with PHP
LAMP
PHP MySQL Functions
PHP Zip File Functions
Substrings PHP
PHP Variable names
PHP magic methods
How to get current session id
Add variables into a session
$_GET , $_POST,$_COOKIE
different tables present in mysql
PHP CURL
php Sessions page
PHP-sorting an array
PHP-count the elements of array
Operators for If/Else Statements
PHP file uploading code
PHP global variables
Testing working using phpinfo
PHP Code for a Valid Number
PHP-Associative Arrays
PHP mvc tutorial
PHP get_meta_tags-Extracts
difference between print and echo
PHP best tutorial-PHP variables
Reading DOC file in PHP
PHP interview questions
convert time PHP
PHP implode array elements
header function-PHP
PHP-Renaming Files Directories
PHP Classes
in_array function in PHP
keep your session secure PHP
Web Application with PHP
What is SQL Injection
PHP-extract part of a string
PHP urlencode
PHP- know browser properties
PHP- Extracting Substrings
Checking Variable Values /Types
PHP-best 20 Open Source cms
IP AddressPHP
PHP-Scope Resolution Operator
how create new instance of object
how eliminate an object
PHP- ob_start
XML file using the DOM API
PHP- MVC
PHP- CAPTCHA
PHP- Position of a Value in an Array
PHP-Mail Functions
PHP-difference include vs require
calculate the sum of values in an array
PHP-total number of rows
Show unique records mysql
MySQL Triggers
MySQL data directory
MySQL Subqueries
PHP- Networking Functions
PHP- Operators
Restore database
Conditional Functions mysql
PHP-function overloading
Friend function
mysql_connect /mysql_pconnect
PHP-Error Control Operators
what is IMAP
Apache-Specific Functions
Send Email from a PHP Script
SQL inherently
WAMP, MAMP, LAMP
Php tutorial-SYMBOLS
Table Types-MySQL
PHP-Encryption data management
PHP Array
Running MySQL on Windows
Maximum Performance MySQL
XML-RPC
PHP-static variables
Advanced Database Techniques
FTP
Codeigniter
Apache Pool Size
Why NoSQL
MySQL Server Performance
Database software
SQL Interview Answers
PHP Redirect
PHP Interview Questions with Answers
Advanced PHP

Abstract data type


In programming, a data set defined by the programmer in terms
 of the information it can contain and the operations that can be performed
 with it. An abstract data type is more generalized than a data type
constrained by the properties of the objects it contains—for example,
the data type “pet” is more generalized than the data types.

 The standard example used in illustrating an abstract data type is the
stack, a small portion of memory used to store information, generally on
 a temporary basis. As an abstract data type, the stack is simply a
structure onto which values can be pushed added and from which they
can be popped removed. The type of value, such as integer, is irrelevant
 to the definition.The way in which the program performs operations on
abstract data types is encapsulated, or hidden, from the rest of the program.
 Encapsulation enables the programmer to change the definition of the data
 type or its operations without introducing errors to the existing code
that uses the abstract data type. Abstract data types represent an intermediate
step between traditional programming and object-oriented programming.

The use of specialized software, such as an application programming interface
API, as a means of shielding software from device dependencies or the
complexities of underlying software. For instance, hardware abstraction
enables programs to focus on a task, such as communications, instead of on
individual differences between communications devices.


In object-oriented programming, the process of reducing an object to its
 essence so that only the necessary elements are represented.


Abstraction defines an object in terms of its properties attributes,
behaviors functionality, and interface means of communicating
with other objects.

Alia bhatt Movie Highway

Alia bhatt and randeep hooda's   highway has created a lot of buzz.
Alia bhatt, who has lent her voice to a song in her upcoming film highway,says if she fails as an actress, she will turn to singing.




Highway: alia bhatt turns singer, thanks to a r rahman alia bhatt,
who has lent her voice to a song in her upcoming film highway , says
if she fails as an actress, she will turn to singing. Zeb bangash
and alia bhatt - sooha saha ost highway .

why alia bhatt is all set to prove herself in both music and bollywood
 with highway.alia bhatt turns singer, thanks to a r rahman  alia bhatt
 was seen at the music launch of highway, her upcoming film with randeep
 hooda the launch took place at taj lands end, mumbai also seen were.

simple Local SEO tips

It may seem a little bit daunting at first to have to do
all of these things. If you have never done some of them, there
 might be a little bit of a learning curve. But once you get it
 down and understand that these are the things you must do to
rank well in Google, it will just become part of your SEO routine
 and you will do them with ease.


Now just a quick review, these are the 5 things that you must
 be doing or taking into consideration to beat Google, the penguin
 update and future Google updates.



1)  Have a strong anchor text distribution for your backlinks.
2)  Implement Authorship Markup on your sites.
3)  Strong Backlink Variation, the more diverse your links, the better.
4)  Get social signals.
5)  Have great on-site optimization and content.


Anybody who tells you that backlinking is dead as a result of the
 Google Penguin update is just trying to scare you or shock you.
 Backlinking is alive and well and it will be for a long time to
come.

 Google may be putting more emphasis on other factors such as on site
 optimization and content now, but that does not mean getting backlinks
 to your sites will now have no effect.

What the update does mean though is that backlinking has changed
 and it is no longer about pounding 1000’s of backlinks out all
 using the same anchor text. Some people may be testing and finding
 that it can still work to do it that way, but they are treading
on thin ice. One of the most common factors of the sites that are
 still standing and thriving since the Google Penguin update is
that they have a strong, diverse backlinking profile.


Blog Commenting
In the past, a lot of people used programs like Scrapebox
to quickly  blast out thousands of irrelevant comments on any
old blog they could scrape. While this worked fairly well
for quite a while, it is a horrible idea now. But blog
commenting in and of itself is still a great idea. Rather than
 blasting thousands of irrelevant comments, now it is important
to comment on relevant blogs or articles with an interesting
and on -topic comment while including your backlink.


Social Media Sites
Twitter, Facebook, Google+, Pinterest, these are all sites you
 should be trying to get links from almost daily. With Twitter,
you want to tweet links to your pages and posts and hope for
re-tweets as well. With Facebook, you want to post links to
your pages and posts as well. The same for Google+ and with
Pinterest, you want to use interesting pictures in your posts
 and pages so that you can pin them for easy backlinks.

seo marketing plan
Free SEO Analysis Tools
Mobile Seo Checklist
Seo algorithm
SEO Success Factors
seo marketing news
SEO Directory
SEO Spamming
seo marketing youtube
seo marketing term
Off-Page SEO Strategies
Top Google SEO Tips
Right sense SEO practices
classfied site in seo
SEO Companies USA
SEO Companies India
SEO Company New York
promoting web pages-seo
Seo Articles
Advanced SEO
SEO Research and Analysis
SEO Tips for Google
Create SEO Friendly URLs
Ranking Fluctuations-SEO
SEO marketing tips
video blogging for SEO
SEO and SEM strategy
Wp SEO advantages
Tips of Internet Marketing
Top ranking with Yahoo
SEO Keyword
SMO is Effective for SEO
magic-seoTips
Video Search Optimizing
Examining SEO and SMO
SEO tips-Adding Your Links
SEO strategies
SEO fanda-The nofollow
Mobile SEO optimizing
Internet Marketing for B2B
Ranking Factors
Internal link architecture
Search Engine Indexing
Seo Traffic Sources
seo tips for wordpress
Top Blog Tips
What SEO tools do you use
Business With SEO
Link metrics
Facebook Custom seo
What is SEO Writing
Optimize Site Speed
Search Marketing Metrics
sitemap SEO
Domain Name Keywords
Cracker Seo Tips
Drupal's SEO tips
Bing Webmaster-seo-tools
Black Hat SEO
Small budget advertising
Additional SEO tips
eCommerce Tips
Twitter tools-seo

online web tools-check list


Name
URL
Description
Foundstone SuperScan
Popular TCP port scanner, pinger, and resolver for the Microsoft Windows platform.
Foundstone FScan
Popular command line port scanner for the Microsoft Windows platform.
Whisker
Popular HTTP / Web vulnerability scanner written in PERL.
Stealth Scanner
Popular HTTP / Web vulnerability scanner written for the Microsoft Windows platform; boasts 18,000 total vulnerability checks.
Nessus Scanner
Popular and free vulnerability scanning application for UNIX (scanning engine) and Microsoft Windows (user interface only) platform; implements distributed scanning architecture and checks for nearly 900 vulnerabilities.
Cerberus Scanner
Free vulnerability scanning application for the Windows platform; checks for many common vulnerabilities for popular Web platforms, as well as Microsoft Windows, UNIX, and database vulnerabilities.
Typhon I Scanner
Free vulnerability scanning application, similar to the Cerberus scanner, for the Microsoft Windows platform; checks for many common vulnerabilities for popular Web platforms, as well as Windows, UNIX, and database vulnerabilities.
Nmap
Possibly the most popular network mapping tool available; includes support for TCP and UDP service identification, using multiple scanning techniques; provides additional functionality, including remote operating system identification and RPC service identification.

SQL Commands List-Database Servers



SQL Commands
Command
Description
ALTER DATABASE
Alters the selected database by adding or removing files.
ALTER TABLE
Alters a table within a database by altering, adding, or dropping columns.
ALTER VIEW
Alters a previously created view.
CREATE DATABASE
Creates a new database.
CREATE PROCEDURE
Creates a stored procedure.
CREATE SCHEMA
Creates a schema within a database.
CREATE TABLE
Creates a table within a database.
CREATE VIEW
Creates a database view to a table(s).
DELETE
Deletes rows from a table.
DROP DATABASE
Removes a database by deleting its files.
DROP PROCEDURE
Removes a stored procedure.
DROP TABLE
Removes a table from a database.
DROP VIEW
Removes a view from a database.
INSERT
Adds a new row to a table or view.
SELECT
Selects fields within a given table(s) for viewing.
USE
Uses a particular database for the commands following.
The best countermeasure for controlling stored procedures is simply to delete them. You can do so by taking these steps:
1.       Use the Microsoft SQL Server Enterprise Manager to open the database desired, usually Master.
2.       Expand the Extended Stored Procedures folder within the database.
3.       Right click on the stored procedure.
4.       For SQL Servers 7.x, 8.x, and 2000 select the Delete feature to remove the stored procedure.
If removing the stored procedures outright isn't an option before extensive testing is performed, you can restrict the permissions on the stored procedures. To perform ACLing on the SPs, follow this procedure:
1.       Use the Microsoft SQL Server Enterprise Manager to open the database desired, usually Master.
2.       Expand the Extended Stored Procedures folder within the database.
3.       Right click on the stored procedure.
4.       Select Properties.
5.       Click on the Permissions tab.
6.       Change the permissions as desired.

Part of the Transact-SQL reference, Microsoft SQL 2000 provides a litany of simple functions that can be called directly within an SQL string to provide valuable information. Here is a short list of helpful functions:
db_id()
Displays the database ID. Example: select db_id(); or use mydb; select db_id()
db_name()
Displays the currently used database name and is helpful in understanding what database is being used by default. Example: select db_name();
file_name(<ID>)
Displays the logical file name for the supplied file identifier (ID) and is helpful for enumerating all the files within a database. Example: select file_name(1) or use mydb; select file_name(1);
Getdate()
Displays the date and time on the system. select getdate()
object_name(<parm>)
Displays the database object name and is helpful in enumerating the various objects within a database. select object_name(1) or use mydb; select object_name(1)
setuser <user>
Impersonates a user but is valid only if existing user is member of sysadmin or db_owner fixed database role. setuser 'jane';
current_user
Displays the currently logged in user for the SQL session and is helpful in identifying the user making database queries. select current_user;
These Transact-SQL functions can be enormously helpful to an attacker.

An attacker would salivate over this information. Other keywords that can be used are:
CHECK_CONSTRAINTS
COLUMN_DOMAIN_USAGE
COLUMN_PRIVILEGES
COLUMNS
CONSTRAINT_COLUMN_USAGE
CONSTRAINT_TABLE_USAGE
DOMAIN_CONSTRAINTS
DOMAINS
KEY_COLUMN_USAGE
PARAMETERS
REFERENTIAL_CONSTRAINTS
ROUTINES
ROUTINE_COLUMNS
SCHEMATA
TABLE_CONSTRAINTS
TABLE_PRIVILEGES
TABLES
VIEW_COLUMN_USAGE
VIEW_TABLE_USAGE
VIEWS
Unfortunately, this functionality, also, is inherent in Microsoft SQL Server and cannot be shut off.

Master.dbo Default System Stored and Extended Stored Procedures
Procedure
Description
sp_addmessage
Adds a new error message to the sysmessages table.
sp_configure
Displays or changes global configuration settings such as c2 audit mode, allow updates, remote access, remote login timeout, user connections, and the like.
sp_help
Can enumerate just about anything on the SQL Server itself, including all objects.
sp_helpdb
Lists the databases available and, when used with a database name as a parameter, displays specific database information.
sp_helpprotect
Displays information on permissions for objects.
sp_OACreate
Creates an instance of the OLE object.
sp_OADestroy
Destroys an OLE object.
sp_OAGetErrorInfo
Displays OLE Automation error information.
sp_OAGetProperty
Displays a property value of an OLE object.
sp_OAMethod
Calls a method of an OLE object.
sp_OASetProperty
Sets a property of an OLE object.
sp_OAStop
Stops the OLE Automation stored procedure.
sp_password
Adds or changes a password for an SQL Server login. Examples: EXEC sp_password 'oldpass', 'newpass', 'sa'.
sp_tables
Displays the tables for the current database. Helpful in enumerating all the tables within a database. Examples: EXEC sp_tables or use mydb; EXEC sp_tables;.
sp_who
Displays information on SQL Server connections such as status, login name, host name where the connection is coming from, and database name and commands such as SELECT.
xp_availablemedia
Reveals the available drives on the machine.
xp_cmdshell
Runs arbitrary commands with administrator privilege.
xp_deletemail
Deletes a message from the Microsoft SQL Server inbox.
xp_dirtree
Allows a directory tree to be obtained.
xp_dsninfo
Displays the ODBC DSN information.
xp_enumdsn
Enumerates ODBC data sources on the server.
xp_enumgroups
Displays a list of Windows groups on the system. Example: EXEC master..xp_dirtree.
xp_eventlog
Displays event logs from the Windows system.
xp_fixeddrives
Displays the fixed drives on the system and its free space in MB.
xp_getfiledetails
Displays the properties of a given file. Example: EXEC master..xp_getfiledetails 'c:\winnt.ini'.
xp_getnetname
Displays the running system's NetBIOS name.
xp_grantlogin
Grants login rights of the specified user. Example: EXEC master..xp_grantlogin administrator.
xp_logevent
Logs a user-defined message in the SQL Server log file.
xp_loginconfig
Reveals information about the security mode of the server.
xp_logininfo
Displays the login information of the various users.
xp_makecab
Allows the user to create a compressed archive of files on the server (or any files the server can access).
xp_msver
Displays the Microsoft SQL Server version, including all information about the operating system. Example: EXEC master..xp_msver.
xp_ntsec_enumdomains
Enumerates domains that the server can access.
xp_readerrorlog
Displays the SQL Server error log.
xp_readmail
Reads a mail message in the SQL Server inbox.
xp_regaddmultistring
Adds a multi string registry key.
xp_regdeletekey
Deletes a registry key.
xp_regdeletevalue
Deletes a value within a registry key.
xp_regenumkeys
Enumerates registry key.
xp_regenumvalues
Enumerates registry key values.
xp_regread
Reads a registry key.
xp_regremovemultistring
Removes a multistrong registry key.
xp_regwrite
Writes to a registry key.
xp_revokelogin
Revokes access from a Windows group or user.
xp_sendmail
Sends a message to someone.
xp_servicecontrol
Allows a user to start or stop a Windows service. Examples: EXEC master..xp_servicecontrol 'start', 'schedule'.
xp_startmail
Starts an SQL Server mail client session.
xp_stopmail
Stops an SQL Server mail client session.
xp_subdirs
Displays a list of subdirectories.
xp_terminate_process
Terminates a process, given its process ID (PID).
xp_unc_to_drive
Unknown.



Yaami Gautam - the eyes