Fixing URL check now we can accept URl with no www like http://youtube.com

skala
Julio Montoya 14 years ago
parent fb6bb16c9b
commit 9e8ca418fc
  1. 4
      main/inc/ajax/link.ajax.php

@ -20,11 +20,13 @@ switch ($action) {
echo ''; echo '';
exit; exit;
} }
// set URL and other appropriate options // set URL and other appropriate options
$defaults = array( $defaults = array(
CURLOPT_URL => $url, CURLOPT_URL => $url,
CURLOPT_FOLLOWLOCATION => true, // follow redirects accept youtube.com
CURLOPT_HEADER => 0, CURLOPT_HEADER => 0,
CURLOPT_RETURNTRANSFER => TRUE, CURLOPT_RETURNTRANSFER => true,
CURLOPT_TIMEOUT => 4 CURLOPT_TIMEOUT => 4
); );
//create a new cURL resource //create a new cURL resource

Loading…
Cancel
Save