Okay, on the #1, you can always just remove them in the scraping section. You would just need to find the strpos() of the https and have it remove the “s”. Something loosely like this would do that:
$start = strpos($webpage, “https”);
$webpage = substr($webpage, 0, $start+3) . $substr($webpage, $start+5, strlen($webpage)-$start;
But, not tested, just off the top of my head…
Now, on the rest, how have you tested it? Have you attempted to debug it yet? The first thing would be to have the value passed to the external php script displayed to see if it is getting the correct value.
var idCode = document.getElementById('ThaiParcelsCode').value; alert(idCode);
And, see if that shows you the value entered. Since the external script needs that, you should first check that it is working. If that works, then you need to debug the external file to see if it is receiving it from the AJAX call. In the example code I created above for you, I had the alert in it so you could see if you were getting any results from the file. Did that part work? Also, sometimes you need to use quotes inside a call to the external page. You might need to add them in.
I might have some time later on to create a full working test page for you. Just a bit busy right now…