|
@@ -140,7 +140,13 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
140
|
140
|
else
|
141
|
141
|
return false;
|
142
|
142
|
}
|
143
|
|
-
|
|
143
|
+
|
|
144
|
+ function getYoutubeVideoUrl($videoUrl) {
|
|
145
|
+ $params = explode("?v=", $videoUrl);
|
|
146
|
+ $params2 = explode("&",$params[1]);
|
|
147
|
+ return $params2[0];
|
|
148
|
+ }
|
|
149
|
+
|
144
|
150
|
function isYahooVideo($videoUrl){
|
145
|
151
|
if (beginsWith($videoUrl, "http://video.yahoo.com/watch/") || beginsWith($videoUrl, "http://www.video.yahoo.com/watch/"))
|
146
|
152
|
return true;
|
|
@@ -155,11 +161,6 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
155
|
161
|
$values[1] = $params2[1];
|
156
|
162
|
return $values;
|
157
|
163
|
}
|
158
|
|
- function getYoutubeVideoUrl($videoUrl) {
|
159
|
|
- $params = explode("?v=", $videoUrl);
|
160
|
|
- $params2 = explode("&",$params[1]);
|
161
|
|
- return $params2[0];
|
162
|
|
- }
|
163
|
164
|
|
164
|
165
|
function isGoogleVideoUrl($videoUrl){
|
165
|
166
|
if (beginsWith($videoUrl, "http://video.google.com/videoplay?")){
|
|
@@ -174,6 +175,20 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
174
|
175
|
$params2 = explode("&",$params[1]);
|
175
|
176
|
return $params2[0];
|
176
|
177
|
}
|
|
178
|
+
|
|
179
|
+ function isMTVVideoUrl($videoUrl){
|
|
180
|
+ if (beginsWith($videoUrl, "http://www.mtvmusic.com/video/?id=") || beginsWith($videoUrl, "http://mtvmusic.com/video/?id=")){
|
|
181
|
+ return true;
|
|
182
|
+ } else {
|
|
183
|
+ return false;
|
|
184
|
+ }
|
|
185
|
+ }
|
|
186
|
+
|
|
187
|
+ function getMTVVideoCode($videoUrl){
|
|
188
|
+ $params = explode("?id=", $videoUrl);
|
|
189
|
+ $params2 = explode("&",$params[1]);
|
|
190
|
+ return $params2[0];
|
|
191
|
+ }
|
177
|
192
|
|
178
|
193
|
function isDailymotionVideo($videoUrl) {
|
179
|
194
|
if (beginsWith($videoUrl, "http://www.dailymotion.com/video/") || beginsWith($videoUrl, "http://dailymotion.com/video/"))
|
|
@@ -209,6 +224,7 @@ if(!defined('entry') || !entry) die('Not a valid page');
|
209
|
224
|
elseif (isYahooVideo($url)) { return true; }
|
210
|
225
|
elseif (isSlideSharePresentation($url)) { return true; }
|
211
|
226
|
elseif (isGoogleVideoUrl($url)) { return true; }
|
|
227
|
+ elseif (isMTVVideoUrl($url)) { return true; }
|
212
|
228
|
else { return false; }
|
213
|
229
|
}
|
214
|
230
|
|