Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php check internet connection

function is_connected()
{
    $connected = @fsockopen("www.example.com", 80); 
                                        //website, port  (try 80 or 443)
    if ($connected){
        $is_conn = true; //action when connected
        fclose($connected);
    }else{
        $is_conn = false; //action in connection failure
    }
    return $is_conn;

}
Comment

PREVIOUS NEXT
Code Example
Php :: union of two arrays in php 
Php :: checks number only in php 
Php :: php post curl json 
Php :: date add one day php 
Php :: laravel deployment 
Php :: get unique values in laravel 
Php :: restcord Guild Icon outputs 404. 
Php :: shoulder blade technical name 
Php :: blade capitalize first letter 
Php :: laravel with trashed specific 
Php :: check if delete query was successful laravel 
Php :: strtoupper php 
Php :: persian error laravel 
Php :: laravel sentence word count 
Php :: add csrf token laravel 
Php :: composer require laravel/ui laravel 7 
Php :: how to delete a file in laravel 
Php :: count files in folder php 
Php :: laravel migrate fresh 
Php :: how to display list of all pages in wordpress 
Php :: get type of variable php 
Php :: formdata jquery ajax php 
Php :: php artisan services 
Php :: get the unique rows from table laravel 
Php :: request old laravel form select 
Php :: php convert multidimensional object to array 
Php :: laravel make model and controller 
Php :: filemtime($current_file_name); 
Php :: insert timestamps manually in laravel 
Php :: php append line to file 
ADD CONTENT
Topic
Content
Source link
Name
9+8 =