Get rid of warning massage
Get rid of warning massage
am 20.10.2009 17:34:46 von resea soul
--0016361e7b801f3fa304765f9a10
Content-Type: text/plain; charset=ISO-8859-1
Hi,
I'm using the function file_get_contents($url). If the url is invalid the
function displays a warning message while I am using my own customized
message. I want to get rid of the warning message.
Thank you
--0016361e7b801f3fa304765f9a10--
Re: Get rid of warning massage
am 20.10.2009 17:37:36 von kranthi
http://php.net/manual/en/language.operators.errorcontrol.php ?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Get rid of warning massage
am 20.10.2009 17:38:47 von Philip Thompson
--Apple-Mail-1643-720537337
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
charset=us-ascii;
format=flowed;
delsp=yes
On Oct 20, 2009, at 10:34 AM, resea soul wrote:
> Hi,
>
> I'm using the function file_get_contents($url). If the url is
> invalid the
> function displays a warning message while I am using my own customized
> message. I want to get rid of the warning message.
>
> Thank you
@file_get_contents(...)
--Apple-Mail-1643-720537337--
Re: Get rid of warning massage
am 20.10.2009 17:39:55 von Skylinux
resea soul wrote:
> I'm using the function file_get_contents($url). If the url is invalid the
> function displays a warning message while I am using my own customized
> message. I want to get rid of the warning message.
This should do it:
@file_get_contents($url)
--
John
Gott ist eine faustgrobe Antwort, eine Undelikatesse gegen uns Denker -,
im Grunde sogar bloß ein faustgrobes Verbot an uns: ihr sollt nicht
denken!
[Friedrich Nietzsche]
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Get rid of warning massage
am 20.10.2009 17:40:18 von Ashley Sheridan
--=-Wz2Gywrw5Ui3zmqYdEET
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Tue, 2009-10-20 at 11:34 -0400, resea soul wrote:
> Hi,
>
> I'm using the function file_get_contents($url). If the url is invalid the
> function displays a warning message while I am using my own customized
> message. I want to get rid of the warning message.
>
> Thank you
How do you mean an invalid URL? A URL that is not valid as in $url =
"poo" or a valid formed URL that doesn't exist?
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-Wz2Gywrw5Ui3zmqYdEET--
Re: Get rid of warning massage
am 20.10.2009 17:42:00 von Goltsios Theodore
> http://php.net/manual/en/language.operators.errorcontrol.php ?
>
>
A better idea would be suppressing the error messages in a production site:
ini_set('display_errors',0);
--
Thodoris
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: Get rid of warning massage
am 20.10.2009 18:01:24 von Goltsios Theodore
--------------010902030809030007010900
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
>
>
>
> How do you mean an invalid URL? A URL that is not valid as in $url =
> "poo" or a valid formed URL that doesn't exist?
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
>
Does it really matter? In both cases the file_get_contents() wont be
able to open the URL and it will produce a warning or an error.
--
Thodoris
--------------010902030809030007010900--
Re: Get rid of warning massage
am 20.10.2009 18:03:45 von Ashley Sheridan
--=-DOAKQ60WcJeRE9uXdIxz
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
On Tue, 2009-10-20 at 19:01 +0300, Thodoris wrote:
>
>
> >
> >
> >
> >
> > How do you mean an invalid URL? A URL that is not valid as in $url =
> > "poo" or a valid formed URL that doesn't exist?
> >
> > Thanks,
> > Ash
> > http://www.ashleysheridan.co.uk
> >
> >
> >
> >
>
>
> Does it really matter? In both cases the file_get_contents() wont be
> able to open the URL and it will produce a warning or an error.
>
> --
> Thodoris
Matters a hell of a lot! If the url is not even partially validated at
all ($url="poo") then it could potentially be open to all manner of
attacks.
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-DOAKQ60WcJeRE9uXdIxz--
Re: Get rid of warning massage
am 20.10.2009 18:55:15 von Shawn McKenzie
Ashley Sheridan wrote:
> On Tue, 2009-10-20 at 19:01 +0300, Thodoris wrote:
>
>>
>>>
>>>
>>>
>>> How do you mean an invalid URL? A URL that is not valid as in $url =
>>> "poo" or a valid formed URL that doesn't exist?
>>>
>>> Thanks,
>>> Ash
>>> http://www.ashleysheridan.co.uk
>>>
>>>
>>>
>>>
>>
>> Does it really matter? In both cases the file_get_contents() wont be
>> able to open the URL and it will produce a warning or an error.
>>
>> --
>> Thodoris
>
>
> Matters a hell of a lot! If the url is not even partially validated at
> all ($url="poo") then it could potentially be open to all manner of
> attacks.
>
> Thanks,
> Ash
> http://www.ashleysheridan.co.uk
>
>
>
Yes, and depending upon how many URLs you're looping through, you could
be wasting lots of time and resources for absolutely no reason.
--
Thanks!
-Shawn
http://www.spidean.com
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php