There is the following script:
$output = file_get_contents('http://ru.heroquizz.com/t/zpa254ylg4'); echo preg_replace('/^yii2.co75701.tmweb.ru$/', "ru.heroquizz.com", $output); There should be a link replacement, but it does not occur. Why?
There is the following script:
$output = file_get_contents('http://ru.heroquizz.com/t/zpa254ylg4'); echo preg_replace('/^yii2.co75701.tmweb.ru$/', "ru.heroquizz.com", $output); There should be a link replacement, but it does not occur. Why?
the point - in the regular expression is any character. right:
echo preg_replace('/yii2\.co75701\.tmweb\.ru/', "ru.heroquizz.com", $output); although on the page http://ru.heroquizz.com/t/zpa254ylg4 I didn’t find yii2.co75701.tmweb.ru ...
Perhaps you need the opposite:
echo preg_replace('/ru\.heroquizz\.com/', "yii2.co75701.tmweb.ru", $output); Source: https://ru.stackoverflow.com/questions/592357/
All Articles