echo parse_url("http://foo?bar#fizzbuzz",PHP_URL_FRAGMENT);
<script>alert(window.location.hash);</script>
<script>$('#LocationHash').val(document.location.hash.replace('#',''));</script>
<input type="hidden" id="LocationHash" name="LocationHash" value="">
if(isset($_GET['reg']) && !empty($_GET['reg'])) $_SESSION['ref_id'] = intval($_GET['reg']);
// this is the id of the form
$("#idForm").submit(function(e) {
var url = "path/to/your/script.php"; // the script where you handle the form input.
$.ajax({
type: "POST",
url: url,
data: $("#idForm").serialize(), // serializes the form's elements.
success: function(data)
{
alert(data); // show response from the php script.
}
});
e.preventDefault(); // avoid to execute the actual submit of the form.
});
$client = new Client();
try {
$client->get('https://10.128.128.8:5007/esic/api', ['query' => ['foo' => 'bar']]);
} catch (\Exception $e) {
echo $e->getRequest() . "\n";
if ($e->hasResponse()) {
echo $e->getResponse() . "\n";
}
}
$client = new Client(['verify' => false]);