Skip to content

Instantly share code, notes, and snippets.

@le717
Created October 12, 2018 00:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save le717/be9d1ccf42281aa260f05915ea1cdac0 to your computer and use it in GitHub Desktop.
Save le717/be9d1ccf42281aa260f05915ea1cdac0 to your computer and use it in GitHub Desktop.
<?php
function sqlURL($sql_input) {
$res = parse_url($sql_input);
if(!isset($res['scheme'])) {
$sql_input = "http://".$sql_input;
}
$sql_input = str_replace("'","\'",stripslashes($sql_input));
$sql_input = str_replace("<","",$sql_input);
$sql_input = str_replace(">","",$sql_input);
return $sql_input;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment