O
O
Odalala2015-12-12 23:19:51
PHP
Odalala, 2015-12-12 23:19:51

https: substitution in PHP?

Actually there is

if($config['parse_fields_gp']['image']) {
        preg_match('#<img class="cover-image" src="(.*?)"#iu', $html, $m_image);
        if(!empty($m_image[1]))
          $object['image'] = $m_image[1];

The address is parsed, but at the beginning it stands // it is necessary that https: be substituted first (to get a direct link)

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander, 2015-12-12
@disc

Try to do without regular expression, use str_replace

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question