Archive for the 'PHP' Category
Viewing 21-29 of 29 FAQ -- How to determine or retrieve visitor’s IP address using PHP
Q. How do I determine or retrieve visitor’s IP address using PHP server side programming?
A. Use following enviorment variable to get visitor’s IP address:
No Proxy detection
=> REMOTE_ADDR - Remote client IP address
With Proxy detection
=> HTTP_X_FORWARDED_FOR - Get Proxy server IP
PHP getenv() function
=> Use php getenv() function to read the value of the environment. [...] - How to: Connect to my MySQL Database server using command line and php
Q. How do I connect to my MySQL database server using command line (over ssh) or using PHP?
A. You can connect to MySQL database server using mysql command line client or using programming language such as PHP or perl.
Task: Use command line client - mysql
Genral syntax is as follows:
mysql -u DBUSER -h DBSERVERNAME -p
So [...] - Howto: PHP setup include_path
Q. How do I set PHP include path?
A. The configuration file php.ini is read when PHP starts up. For the server module versions of PHP, this happens only once when the web server is started. For the CGI and CLI version, it happens on every invocation. This file is use to setup include_path.
Method # 1- [...] - Install and Test PHP on Linux system
Q. How can I install and test PHP on Linux? How do I make sure it is working on my Linux system? I am using Red Hat Fedora Core Linux.
A. PHP (PHP Hypertext Preprocessor) is an open-source, programming language. Originally designed as a high level scripting language for producing dynamic Web pages, PHP is [...] - PHP not connecting to a MySQL database server
Q. I have Apache Web server and MySQL configured. Everything works fine except I am not able to connect to a MySQL database server (I am able to connect mysql server with mysql client). So how do I configure or connect PHP scripts?
A. You need to install MySQL module for php4 or php5. Without php-mysql [...] - File size limit exceeded error under Linux and solution
Q. I am trying to copy a file called act.dat and I am getting an error “file size limit exceeded” under Linux. How do I get rid of this error? In addition, I do have enough disk space to copy this file.
A. Your system administrator must have imposed limitation on your account for file size [...] - PHP Howto Read IP address of remote computer/browser
PHP has in built facility to detect remote browser or IP address and other properties. These values are assigned to special variable. In this case, it is assigned to variable called REMOTE_ADDR. You can use any one of the following statement to obtained or read IP address:
$ip = $_SERVER['REMOTE_ADDR'];
OR
$ip= $REMOTE_ADDR;
Here is sample code:
<?
$ip= $REMOTE_ADDR;
echo “<br> [...] - PHP: How do I read from text file?
Q. How do I read from text file using PHP under Linux or UNIX?
A. PHP does supports the file reading and writing.
You can open a file using the fopen() function. Once the file is open, you can use the fgets() function to read from the file.
For example, if you wish to open file [...] - What is MySQL?
MySQL is open source database server. It is reliable and widely used by web developers around the world. You can use PHP or Perl scripting to access a MySQL database. However, thousands of ready to use application available for MySQL, here is list of some of the most popular application (written in PHP [PHP (Hypertext [...]
« Previous Page
Viewing 21-29 of 29 FAQ -



Recent Comments
Today ~ 2 Comments
Yesterday ~ 10 Comments
Yesterday ~ 12 Comments
09/03/2008 05:29 pm (2 days ago) ~ 6 Comments
09/03/2008 01:14 pm (2 days ago) ~ 1 Comment