Jump to content

PHP cURL and arbitary ports other than 80


PredaGR

Recommended Posts

hello people,

trying to develop bi-directional communication between outside world and Second Life using In-World objects that have HTTP Client and or Server

while I can work on normal sites using port 80, the communication happens at port 12046 with second life objects

like http://sim8726.agni.lindenlab.com:12046/ca...1b-8754b02039d3 and cURL doesn't seem to respond well to it and I have no idea if it is the host disabling it or something crawling under the wires

is there any idea, advice or fix anyone might have in mind?

 

so far I am trying to send the URL of the object to PHP, try to use that address to fetch data and return them to compare if same

the address arrives successfully from previous tests retrieving POST variables

 

<?php
$url = parse_url(urldecode($_POST["address"]));
$ch = curl_init("http://" . $url["host"] . $url["path"]);
curl_setopt($ch, CURLOPT_PORT, 12046);
curl_setopt($ch, CURLOPT_POSTFIELDS, "");
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HEADER, 0);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
echo $result = curl_exec($ch);
curl_close($ch);
?>

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...