I am using the following to verify a url:
if (!$fp = fopen(http://www.anyurl.com;, r))
{
echo not valid;
}
else
{
echo this is a valid url;
}
I always get a not valid message. What am I doing wrong? Is there a better
way to do this?
Mark Roberts
Sr. Systems Analyst
LanApps/Web
Try an extra layer of parens:
if (($fp = fopen(http://www.anyurl.com;, r) == NULL)
{
echo not valid;
}
else
{
echo this is a valid url;
}
Roberts, Mark wrote:
I am using the following to verify a url:
if (!$fp = fopen(http://www.anyurl.com;, r))
{
echo not valid;
}
Oops ... That's not balanced. Add another ) at the end of the if.
/bsh/
Billy S Halsey wrote:
Try an extra layer of parens:
if (($fp = fopen(http://www.anyurl.com;, r) == NULL)
{
echo not valid;
}
else
{
echo this is a valid url;
}
Roberts, Mark wrote:
I am using the
)
[EMAIL PROTECTED]
www.phpbeginner.com
-Original Message-
From: Dmitry [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 25, 2001 5:44 AM
To: [EMAIL PROTECTED]
Subject: [PHP] checking url
Hello all.
Can you tell me, how can I check url address?
Also I want to know error, which return
is not in things, it is in us.
You will ultimately be known by what you give and not what you get.
- Original Message -
From: Dmitry [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Wednesday, April 25, 2001 2:14 AM
Subject: [PHP] checking url
Hello all.
Can you tell me, how can I check url
Hello all.
Can you tell me, how can I check url address?
Also I want to know error, which return.
Dmitry
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators,
How do you mean, check? Do you want to use a regular expression to see if
it's a valid URL, or do you want to open a connection to it and see if the
site actually exists?
--
Plutarck
Should be working on something...
...but forgot what it was.
Dmitry [EMAIL PROTECTED] wrote in message
[EMAIL
Hi,
How can I check for existing site (e.g. http://www.somehost.com/someone)
and check for existing mail ?
Thanks,
Rosen Marinov
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the
8 matches
Mail list logo