Is there a way of detecting cURL connections? PHP -


basically have php page want display data, want page downloadable , people can display locally. but! want add feature can check internet connection, connecting page's origin see if resources available such external style sheets etc. checking connection this:

public function connection(){     const location='http://myresource.co.uk/';     $curl=curl_init(location);     $result=curl_execute();     curl_close();     return($result==='i exist')?true:false; } 

now i'm bit stuck because want resources index display information. want use 'i exist' when checking resource. possible? or should use additional file sane person? xd

this isn't going practically work because users typically aren't going have php installed. can allow them download php file.. sure unless have web server running it's not going work. on top of they'll need have curl extension etc..

see here check if extension loaded: http://php.net/manual/en/function.extension-loaded.php


Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

Rendering JButton to get the JCheckBox behavior in a JTable by using images does not update my table -