Bonjour à tous, je cherche depuis un petit moment maintenant à utiliser ce script
Je ne recois comme réponse qu'un "link NOT found" :roll:
Quelqu'un saurai il m'éclairer ?
Merci
![Smile :) :)](https://cdn.jsdelivr.net/joypixels/assets/8.0/png/unicode/64/1f642.png)
PHP:
<span class="syntaxhtml"><br /><span class="syntaxdefault"><?php<br /></span><span class="syntaxkeyword">function </span><span class="syntaxdefault">check_back_link</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">$remote_url</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">$your_link</span><span class="syntaxkeyword">) {<br /> </span><span class="syntaxdefault">$match_pattern </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">preg_quote</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">rtrim</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">$your_link</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"/"</span><span class="syntaxkeyword">), </span><span class="syntaxstring">"/"</span><span class="syntaxkeyword">); <br /> </span><span class="syntaxdefault">$found </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">false</span><span class="syntaxkeyword">;<br /> if(</span><span class="syntaxdefault">$handle </span><span class="syntaxkeyword">= @</span><span class="syntaxdefault">fopen</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">$remote_url</span><span class="syntaxkeyword">, </span><span class="syntaxstring">"r"</span><span class="syntaxkeyword">)){<br /> while(!</span><span class="syntaxdefault">feof</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">$handle</span><span class="syntaxkeyword">)){<br /> </span><span class="syntaxdefault">$part </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">fread</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">$handle</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">1024</span><span class="syntaxkeyword">);<br /> if(</span><span class="syntaxdefault">preg_match</span><span class="syntaxkeyword">(</span><span class="syntaxstring">"/<a(.*)href=[\"']"</span><span class="syntaxkeyword">.</span><span class="syntaxdefault">$match_pattern</span><span class="syntaxkeyword">.</span><span class="syntaxstring">"(\/?)[\"'](.*)>(.*)<\/a>/"</span><span class="syntaxkeyword">, </span><span class="syntaxdefault">$part</span><span class="syntaxkeyword">)){<br /> </span><span class="syntaxdefault">$found </span><span class="syntaxkeyword">= </span><span class="syntaxdefault">true</span><span class="syntaxkeyword">;<br /> break;<br /> }<br /> }<br /> </span><span class="syntaxdefault">fclose</span><span class="syntaxkeyword">(</span><span class="syntaxdefault">$handle</span><span class="syntaxkeyword">);<br /> }<br /> return </span><span class="syntaxdefault">$found</span><span class="syntaxkeyword">;<br />} <br /><br /></span><span class="syntaxcomment">// example:<br /></span><span class="syntaxkeyword">if(</span><span class="syntaxdefault">check_back_link</span><span class="syntaxkeyword">(</span><span class="syntaxstring">'https://www.google.com'</span><span class="syntaxkeyword">,</span><span class="syntaxstring">'www.VOTRESITE.com'</span><span class="syntaxkeyword">)){<br /> echo </span><span class="syntaxstring">'link found'</span><span class="syntaxkeyword">;<br />}else{<br /> echo </span><span class="syntaxstring">'link NOT found'</span><span class="syntaxkeyword">;<br />};<br /><br /></span><span class="syntaxdefault">?><br /></span></span>
Je ne recois comme réponse qu'un "link NOT found" :roll:
Quelqu'un saurai il m'éclairer ?
Merci