<commit_before><?php

function validate($code, $type){

  if($type == "html") $url="http://validator.w3.org/check";
  else if ($type == "css") $url = "http://jigsaw.w3.org/css-validator/validator";
  $handle = curl_init();
  curl_setopt_array(
    $handle,
    array(
      CURLOPT_URL => $url,
      CURLOPT_POSTFIELDS => "fragment=".$code."&output=soap12",
      CURLOPT_RETURNTRANSFER => true
    )
  );

  $curl_response = curl_exec($handle);
  curl_close($handle);

  echo $curl_response;
  return $curl_response;  
}

validate($_POST["html_code"], "html");


?><commit_msg>disabled soap in validator<commit_after><?php

function validate($code, $type){

  if($type == "html") $url="http://validator.w3.org/check";
  else if ($type == "css") $url = "http://jigsaw.w3.org/css-validator/validator";
  $handle = curl_init();
  curl_setopt_array(
    $handle,
    array(
      CURLOPT_URL => $url,
      CURLOPT_POSTFIELDS => "fragment=".$code,
      // CURLOPT_POSTFIELDS => "fragment=".$code."&output=soap12",
      CURLOPT_RETURNTRANSFER => true
    )
  );

  $curl_response = curl_exec($handle);
  curl_close($handle);

  echo $curl_response;
  return $curl_response;  
}

validate($_POST["html_code"], "html");


?>
{'fraction_non_alphanumeric': 0.1850941850941851, 'fraction_numerical': 0.006552006552006552, 'mean_word_length': 3.9473684210526314, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1490139', 'n_tokens_mistral': 460, 'n_tokens_neox': 445, 'n_words': 71}