I'm looking for a method to execute a URL from an AJAX page.
The scenario is like im creating a bidding page with 3 products. Time limit is 5 second and after finishing 5 seconds, i wanted to insert the selected product details to database (this is why we need to execute a URL) and the loop should again start from 5 ..4..3..
The issue i'm facing right now is, i can not able to execute a url from this ajax call. I tried CURL; but this is not working.
$.ajax({
url: "test.php",
context: document.body
}).done(function() {
$( this ).addClass( "done" );
});
test.php
--------
curlSession = curl_init();
// HERE I NEED TO EXECUTE THE URL
curl_setopt($curlSession, CURLOPT_URL, 'http://192.168.1.132/oxid/index.php?fnc=tobasket&aid=378442f7aa427425c741607aa3440ee8&am=1');
curl_exec($curlSession);
curl_close($curlSession);
Regards, Tismon