Set xmlhttp = Server.CreateObject("MSXML2.ServerXMLHTTP")
xmlhttp.open "HEAD", "https://work's domain (I am not sure if im allowed to put it here or not. I apologize for any inconvenience)/Images/FSR/" & f1 & "/" & f2 & "/" & fsnm & ".htm", False
xmlhttp.send
Select Case Cint(xmlhttp.status)
Case 200, 202, 302
Set xmlhttp = Nothing
I have an ASP file which I am trying to convert into a PHP. The entire file has been converted except for one part; the code above. I have searched everywhere and tried everything, and I have yet to find a way or a solution to this problem. Any help would be greatly appreciated.
edit: This is what I have so far.
// $xmlhttp->open("HEAD", "https://.../Images/FSR/".$f1."/".$f2."/".$fsnm.".htm", false);
// $xmlhttp->send;
$ch = curl_init();
curl_setopt_array($ch, array(
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_URL => 'https://.../Images/FSR/' . $f1 . '/' . $f2 . '/' . $fsnm . '.htm',
CURLOPT_POST => 1
));
$response = curl_exec($ch);
curl_close($ch);
// OR $xmlhttp->status? OR neither??
switch(intval($xmlhttp->http_response_code()))
{
case 200:
case 202:
case 302:
$xmlhttp = NULL;
redirects to another page
break;
default:
$xmlhttp = NULL;
echo "Image not created, it may not be available yet.";
}