salut tout le monde je suis nouveau ici
j'ai un problème avec un script php qui a pour but convertir les vidéo en mp3
il me donne cette erreur après avoir mis en ligne un web.config
PHP Warning: preg_match(): Delimiter must not be alphanumeric or backslash in F:\Inetpub\vhosts\youtubeconvertermp3.us\httpdocs\robot.php on line 5 PHP Warning: preg_match(): Delimiter must not be alphanumeric or backslash in F:\Inetpub\vhosts\youtubeconvertermp3.us\httpdocs\robot.php on line 7 PHP Warning: preg_match(): Delimiter must not be alphanumeric or backslash in F:\Inetpub\vhosts\youtubeconvertermp3.us\httpdocs\lib\youtube.lib.php on line 18
le script robot.php
<?php
header("Cache-Control: no-cache, must-revalidate"); // HTTP/1.1
header("Expires: Sat, 26 Jul 1997 05:00:00 GMT"); // Date in the past
require_once('lib/youtube.lib.php');
if (!preg_match('youtube.com|localhost', $_GET['url']))
{
if (preg_match('www.', $_GET['url']))
{
$_GET['url'] = str_replace('http://', 'http://www.', $_GET['url']);
}
list($video_id, $download_link) = get_youtube($_GET['url']);
?>
<p>
<img src="http://img.youtube.com/vi/<?php
echo trim($video_id);
?>/1.jpg" alt="Preview 1" class="ythumb" />
<img src="http://img.youtube.com/vi/<?php
echo trim($video_id);
?>/2.jpg" alt="Preview 2" class="ythumb" />
<img src="http://img.youtube.com/vi/<?php
echo trim($video_id);
?>/3.jpg" alt="Preview 3" class="ythumb" />
</p>
<p>
<a href="download.php?url=<?php
echo urlencode($download_link);
?>" class="ydl" title="Download as MP3">Download MP3</a>
<a href="download.php?url=<?php
echo urlencode($download_link . '&fmt=18');
?>" class="ydl" title="Download as MP4">Download MP4</a>
<a href="download.php?url=<?php
echo urlencode($download_link . '&fmt=17');
?>" class="ydl" title="Download as 3GP">Download 3GP</a>
</p>
<?php
}
else
{
die('<span style="color:red;">Sorry, the URL is not recognized..</span>');
}
?>
merci