Give wrong info

Site down or not website

I just made this script and this script worked fine on xampp and other hosting site like, ETC. but when I upload this script on infinityFree site its gave wrong info … Like my script is website down or up check . but here when I put wrong url still it says your site is up . But other hosting site it show correctly …
cant you please tell me why this happens …

You made your own script? But you don’t know why it doesn’t work?
You (the creator) even don’t know, let alone me.

Hi @Rakib1111
If your script is open source, we may help ypu debug it, but if released with copyright, we cant help.

And you can also try turning on PHP errors in the .htaccess file.

In general, you dont specify how your code works and asking help without more info is very difficult too.


This work all other webhost and xampp except … Thats reason I dont know what happens …

Yes, hosts don’t work like eachother, the it works normally on other hosts is not a proper statement, just answer to above questions.


Are you sure you enter same input in each hosts? Different input will generate different result.

What function that you use for that script to check other site?
I can create a simple script like that using curl_getinfo(), get_headers(), or http_response_code().

& you should validated your input script so someone can’t enter malicious input.
In your case, for example using filter_var():

if (filter_var($input, FILTER_VALIDATE_URL)) {

You can also sanitize the input using FILTER_SANITIZE_URL.

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.