PHP script can't connect to Arduino web server

I have a simple Arduino web server sketch that reads an analog sensor and serves the data in JSON format. If I access the web server url directly from a browser (i.e. by typing its ip address) it works fine. However, my php script won’t load it! It basically times out. I’ve tried using both cURL and file_get_contents.

Any help would be appreciated. Arduino and PHP code below.

Thanks

PHP:

<?php
$url = 'http://192.168.100.100';

$curl = curl_init($url);
// Disable SSL verification
curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, false);
// Disable SSL host verification
curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, false);
// Will return the response, if false it print the response
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
$data = curl_exec($curl);
curl_close($curl);
echo $data;
var_dump(json_decode($data, true));

/*
$json = file_get_contents($url);
//$json = utf8_encode($json);
var_dump(json_decode($json));
*/
?>

Arduino sketch:

#include <SPI.h>
#include <Ethernet.h>

// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 
  0x90, 0xA2, 0xDA, 0x0F, 0x9C, 0x5D };
//IPAddress ip(192,168,1,177);
boolean error = false;

// Initialize the Ethernet server library
// with the IP address and port you want to use 
// (port 80 is default for HTTP):
EthernetServer server(80);

void setup() {
  // initialize the ethernet device
  if(Ethernet.begin(mac)) {
  // start listening for clients
  server.begin();
  error = false;
  } else {
    error = true;
  }
 // Open serial communications and wait for port to open:
  Serial.begin(9600);
   while (!Serial) {
    ; // wait for serial port to connect. Needed for Leonardo only
  }

  if(error) {
    Serial.print("Error setting up the server!");
  } else {
  Serial.print("MFC server address:");
  Serial.println(Ethernet.localIP());
  }
}


void loop() {
  // these two variables will hold the sensor value and voltage
  float voltage;
  int sensorVal;
  
  // listen for incoming clients
  EthernetClient client = server.available();
  if (client) {
    Serial.println("new client");
    // an http request ends with a blank line
    boolean currentLineIsBlank = true;
    while (client.connected()) {
      if (client.available()) {
        char c = client.read();
        Serial.write(c);
        // if you've gotten to the end of the line (received a newline
        // character) and the line is blank, the http request has ended,
        // so you can send a reply
        if (c == '\n' && currentLineIsBlank) {
          // send a standard http response header
          client.println("HTTP/1.1 200 OK");
          client.println("Content-Type: application/json; charset=utf-8");
          client.println("Server: Arduino");
          client.println("Connection: close");  // the connection will be closed after completion of the response
	  //client.println("Refresh: 5");  // refresh the page automatically every 5 sec
          client.println();

          sensorVal = analogRead(A0); // get the sensor value
          voltage = sensorVal * (5.0 / 1023.0); // convert it to a voltage value
          
          // JSON formatting
          client.print("{\"mfc\":[{\"adc\":\"");
          client.print(sensorVal);
          client.print("\"},");
          client.print("{\"voltage\":\"");
          client.print(voltage);
          client.print("\"}]}");    
          client.println();
          break;
        }
        if (c == '\n') {
          // you're starting a new line
          currentLineIsBlank = true;
        } 
        else if (c != '\r') {
          // you've gotten a character on the current line
          currentLineIsBlank = false;
        }
      }
    }
    // give the web browser time to receive the data
    delay(1);
    // close the connection:
    client.stop();
    Serial.println("client disonnected");
    Serial.println("");
  }
}