Q:

How do I cURL to this type of URL in PHP [192.168.1.30:8080/server]? 

I know you can specify the port number using CURLOPT_PORT, however the server is hosted on the directory stated after the port number.  If cURL cannot accomplish this, is there a method which allows me to POST form data to the URL format I specified above?  Please help. 

A:

Yes, you just need specify CURLOPT_PORT and omit port in your url, like: 
<? php
$post = [
    'field' => 'value',
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'http://192.168.1.30/server');
curl_setopt($ch,CURLOPT_PORT, 8080);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($post));
$response = curl_exec($ch);
if ($response === false) {
    throw new RuntimeException(curl_error($ch));
}
var_export($response);

