예제 #1
0
 $_POST['url_description'] = '';
 $_POST['url_host'] = '';
 /*
  * ---------------------------------------------------------
  * Getting the first URL of publication
  * --------------------------------------------------------
  */
 if ($photoID == '') {
     preg_match_all('#\\bhttps?://[^\\s()<>]+(?:\\([\\w\\d]+\\)|([^[:punct:]\\s]|/))#', $_POST['add_post'], $_matches);
     foreach ($_matches as $_key) {
         $_key = array_unique($_key);
     }
     $_numUrls = count($_matches[1]);
     $firstURL = $_matches[0][0];
     if (!empty($firstURL)) {
         $urlMedia = _Function::expand_link($firstURL);
     } else {
         $urlMedia = NULL;
     }
 } else {
     $urlMedia = '';
 }
 /*
  * ---------------------------------------------------------
  * SoundCloud
  * --------------------------------------------------------
  */
 $isValidUrlSoundCloud = _Function::isValidSoundCloudURL($urlMedia) ? 1 : 0;
 $dataSoundCloud = _Function::isValidSoundCloudURL($urlMedia);
 /*
  * ---------------------------------------------------------