title: How I get the value of "rel" attribute from the html view source using php?
body: <p>I want the value of the <em>rel</em> attribute of the anchor tag associated with the search domain. </p>
  
  <p>I have to change the domain "blog.zeit.de/berlinjournal" instead of "<a href="http://blog.zeit.de/berlinjournal/" rel="nofollow noreferrer">http://blog.zeit.de/berlinjournal/</a>". Use this domain and find out <em>rel</em> Val </p>
  
  <p>@Sam Onela, code not working for this domain. Please help me to solve this error.</p>
  
  <p>My code is:</p>
  
  <pre><code>$domain = 'blog.zeit.de/berlinjournal';
  $handle = fopen($domain, 'r');
  $content = stream_get_contents($handle);
  fclose($handle);
  if ((strpos($content, $domain) !== false)) {
          echo 'true'; // true if $domain found in view source content
  } 
  </code></pre>
  
  <p>Get the clear idea in blow image</p>
  
  <p><a href="https://i.stack.imgur.com/QQmcv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QQmcv.png" alt="enter image description here"></a></p>