Jump to content

PHP/cURL - connecting to a URL with a port


bruuuce

Recommended Posts

CURLOPT_PORT  works successfully. However, the page I want to connect to has more to the url after the port. So, i'm trying to connect to:

 

subdomain.domain.org:8080/Folder

 

i can successfully connect to:

subdomain.domain.org:8080

 

any suggestions, im stumped.

 

 

<?php

// INIT CURL

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'http://subdomain.gotdns.org');

curl_setopt($ch, CURLOPT_PORT, '8080');

curl_setopt ($ch, CURLOPT_POST, 1);.

curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);

$store = curl_exec ($ch);

echo $store;

curl_close ($ch);

 

?>

 

Link to comment
https://forums.phpfreaks.com/topic/94634-phpcurl-connecting-to-a-url-with-a-port/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.