The page where the text comes from looks like this:

<tr class="now"> <td class="when">lbbb</td> <td><a href="/result?q=&quot;r sweeney&quot; Parramatta">"r sweeney" Parramatta</a></td> </tr> <tr> <td class="when">lbbb</td> <td><a href="/result?q=&quot;henry Thomas muggridge&quot; divorce">"henry Thomas muggridge" divorce</a></td> </tr> 

I make a conclusion like this:

 <?php $trendurl = 'http://sdfsdfsd.com/parserurl'; $gtrend = curl_init(); curl_setopt($gtrend, CURLOPT_USERAGENT, sprintf("Mozilla/%d.0",rand(4,5))); curl_setopt($gtrend, CURLOPT_URL,$trendurl); curl_setopt($gtrend, CURLOPT_FAILONERROR, true); curl_setopt($gtrend, CURLOPT_AUTOREFERER, true); curl_setopt($gtrend, CURLOPT_RETURNTRANSFER,true); curl_setopt($gtrend, CURLOPT_TIMEOUT, 30); $trend = curl_exec($gtrend); preg_match_all("/<a href=\"[^>]*>(.*?)<\/a>/is", $trend, $keywords, PREG_PATTERN_ORDER); $i=27; while ($i<37) { $seourl = $keywords[1]; $seourl = str_replace(' ', '+', $seourl); $seourl = str_replace('www.', '', $seourl); $seourl = str_replace('http://', '', $seourl); $seourl = str_replace('https://', '', $seourl); $seourl = str_replace('.', '', $seourl); $seourl = str_replace('"', '', $seourl ); $seourl = str_replace('~', ' ', $seourl); $seourl = str_replace(',', ' ', $seourl); $r = $seourl[$i]; ?> <li><a href="/q_<?php echo strtolower($r); ?>"><?php echo $keywords[1][$i]; ?></a></li> <?php $i++; } curl_close($gtrend); ?> 

How to remove "? It is necessary to output a clean code, without a symbol"

  • What you need to remove quotes or &quot; ? Where, from the address or link text? Try to be clearer - toxxxa
  • Thanks, did what you wrote $ seourl = str_replace ('& quot;', '', $ seourl); Now everything works - seoshni4ek

0