29 require_once dirname(__FILE__).
'/../../include/init.inc';
30 if (empty($GLOBALS[
'SQ_SYSTEM']->user) || !($GLOBALS[
'SQ_SYSTEM']->user->canAccessBackend() || $GLOBALS[
'SQ_SYSTEM']->user->type() ==
'simple_edit_user')) {
35 if (isset($_REQUEST[
'connect_url'])) {
36 $url = $_REQUEST[
'connect_url'];
40 if (isset($_SERVER[
'HTTP_HOST']) && isset($_SERVER[
'PHP_SELF'])) {
41 $current_url = $_SERVER[
'HTTP_HOST'].$_SERVER[
'PHP_SELF'];
45 if (empty($url) || (!empty($current_url) && strpos($url, $current_url) !== FALSE)) {
54 $url_ok = @parse_url($url);
61 'FOLLOWLOCATION' =>
true,
63 'RETURNTRANSFER' =>
true,
64 'CONNECTTIMEOUT' => 5,
69 $response = fetch_url($url, $options, array(), FALSE);
70 if ($response[
'errornumber'] === 0 && $response[
'curlinfo'][
'http_code'] == 200) {