Hi
A) I am able to send eMail using mailx from a UNIX ( solaris 8 ) host to my Outlook-email-ID : FName.Surname@Citigroup.com ( This is NOT my actual -eMail-ID). But in Outlook the "From :" eMail address is displayed as
" usr1@unix-host1.unregistered.email.citicorp.com " .i.e the words... (2 Replies)
Hi All,
How do I send an email using malix where email address contains a #.
I have a email address like this : #test@test.com
I want to send email like malix -s "TEST" #test@test.com < SOMEFILE
I tried \# but doesn't work. Please let me know how we can achieve this?
I am in... (1 Reply)
Hello everyone
I have a problem and I need your help:
I have a Solaris 10 and Solaris 8 UNIX Servers, and Linux Centos4 as email server.
I need send an email from Solaris servers preferably using Centos4 email server.
I have no mail service configured in my Solaris computers (1 Reply)
Hello ,
I am trying to write a unix shell script to compare folder permission to say drwxr-x-wx and then send an email to my id in case the folders don't have the drwxr-x-wx permissions set for them .
I have been trying to come up with a script for few days now , pls help me:( (2 Replies)
hi, i'm running openldap on ubuntu 10.04, creating new items with apache directory studio (windows version).
i use the ldap just as an address book to our small office (email clients are windows live mail 2009, 2011, microsoft outlook 2007 and 2010).
a. i cant see a list of the contacts,... (0 Replies)
Hi,
I have one requirement to send email to email id which is having # ( in the begining of the email id).
I'm using mailx command to send an email. But not receiving those emails, but email status is showing email sent successful.
Code which i'm using is :
cat file1.txt | mailx -s... (3 Replies)
Dear users,
I have Linux server whose versions are Suse 10 SP 3 and Suse 11.
I am trying to send email from these servers to my GroupWise email account.
In /etc/postfix/main.cf file, The current value of MYHOSTNAME is LINUX.LOCAL. What should be the right value of MYHOSTNAME? Is... (0 Replies)
Hi All,
need help with reading the array and sum of the array elements.
given an array of integers of size N . You need to print the sum of the elements in the array, keeping in mind that some of those integers may be quite large.
Input Format
The first line of the input consists of an... (1 Reply)
Discussion started by: nishantrefound
1 Replies
LEARN ABOUT PHP
ip2long
IP2LONG(3) 1 IP2LONG(3)ip2long - Converts a string containing an (IPv4) Internet Protocol dotted address into a proper addressSYNOPSIS
int ip2long (string $ip_address)
DESCRIPTION
The function ip2long(3) generates an IPv4 Internet network address from its Internet standard format (dotted string) representation.
ip2long(3) will also work with non-complete IP addresses. Read http://publibn.boul-
der.ibm.com/doc_link/en_US/a_doc_lib/libs/commtrf2/inet_addr.htm for more info.
PARAMETERS
o $ip_address
- A standard format address.
RETURN VALUES
Returns the IPv4 address or FALSE if $ip_address is invalid.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
|5.2.10 | |
| | |
| | Prior to this version, ip2long(3) would some- |
| | times return a valid number even if passed an |
| | value which was not an (IPv4) Internet Protocol |
| | dotted address. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
ip2long(3) Example
<?php
$ip = gethostbyname('www.example.com');
$out = "The following URLs are equivalent:<br />
";
$out .= 'http://www.example.com/, http://' . $ip . '/, and http://' . sprintf("%u", ip2long($ip)) . "/<br />
";
echo $out;
?>
Example #2
Displaying an IP address
This second example shows how to print a converted address with the printf(3) function in both PHP 4 and PHP 5:
<?php
$ip = gethostbyname('www.example.com');
$long = ip2long($ip);
if ($long == -1 || $long === FALSE) {
echo 'Invalid IP, please try again';
} else {
echo $ip . "
"; // 192.0.34.166
echo $long . "
"; // -1073732954
printf("%u
", ip2long($ip)); // 3221234342
}
?>
NOTES
Note
Because PHP's integer type is signed, and many IP addresses will result in negative integers on 32-bit architectures, you need to
use the "%u" formatter of sprintf(3) or printf(3) to get the string representation of the unsigned IP address.
Note
ip2long(3) will return FALSE for the IP 255.255.255.255 in PHP 5 <= 5.0.2. It was fixed in PHP 5.0.3 where it returns -1 (same as
PHP 4).
SEE ALSO long2ip(3), sprintf(3).
PHP Documentation Group IP2LONG(3)