关于preg_match_all语句 [英] about preg_match_all statement
问题描述
i编写以下代码,以便在我提交网址时从网站捕获图像。同样,我想从网站上捕获文本信息.plz告诉那个.tzz的代码对我有什么帮助。
[php]
<?php
$ content = file_get_contents($ url);
preg_match_all(" /< img(。*)src =(\" |'')(。*)(\" | \'')(。*) [\ /]?> / siU",$ content,$ match,PREG_PATTERN_ORDER);
echo"< b>捕获图片:< / b>< br>" ;;
echo"< br>" ;;
print_r($ match [0]);
echo" ;< br>" ;;
echo"< br>" ;;
echo"< b> Capture Images网址:< / b> < br>< br>" ;;
preg_match_all(" /< img(。*)src =(\" |'')(。*)(\" ; | \'')(。*)[\ /]?> / siU",$ content,$ match,PREG_PATTERN_ORDER);
print_r($ match [3]);
[/ php]
content = file_get_contents(
url);
preg_match_all(" /< img(。*)src =(\" |'')(。*)(\" | \'')(。*) [\ /]> /兆",
内容,
hi,
i write the below code to capture the images from the website when i submit the url.In the same way i want to capture the Text information from the website.plz tell that whats the code for that.plz help me.
[php]
<?php
$content= file_get_contents($url);
preg_match_all( "/<img(.*)src=(\"|'')(.*)(\"|\'')(.*)[\/]?>/siU", $content, $match, PREG_PATTERN_ORDER);
echo "<b>Capture Images :</b><br>";
echo "<br>";
print_r($match[0]);
echo "<br>";
echo "<br>";
echo "<b>Capture Images URLS :</b><br><br>";
preg_match_all( "/<img(.*)src=(\"|'')(.*)(\"|\'')(.*)[\/]?>/siU", $content, $match, PREG_PATTERN_ORDER);
print_r($match[3]);
[/php]
content= file_get_contents(
url);
preg_match_all( "/<img(.*)src=(\"|'')(.*)(\"|\'')(.*)[\/]?>/siU",
content,
这篇关于关于preg_match_all语句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!