0

Hi I'd like to transform this small code into curl. Is this possible?

<?php
$url = 'http://www.example.com/test.php';
$file_headers = @get_headers($url);
if ( strpos($file_headers[0], "200") )
{
    $check = @file_get_contents($url);
    if (stristr($check,"/Style.js"))
        echo "<font color='green'>FOUND</font>";
    else
        echo "<font color='red'>NOT FOUND</font>";
}
?>

I am trying to check the status of a site and after that to find out whether a link to the file "/Style.js" (just this substring) is present in the file test.php or not.

YakovL
  • 7,557
  • 12
  • 62
  • 102
Ayoub Bsl
  • 159
  • 2
  • 6
  • 14
  • Please post in English. I've suggested a semi-robot translation along with improved formatting of the code, but it's not clear what do you mean by "the file Style.js is in the file test.php or not" (initially "si le fichier Style.js dans le fichier test.php ou non ctt") – YakovL Sep 14 '16 at 21:42
  • dans le fichier test.php il y'a cette balise je veut chercher si mot /Style.js dans le fichier ou non – Ayoub Bsl Sep 15 '16 at 00:18

0 Answers0