ID:273875
 
Is there any way to do this? Such as, clicking a link on a webpage.

Secondly, is there a way to do the opposite? Have a topic Export a text string or some data to a webpage?
Mista-mage123 wrote:
Is there any way to do this? Such as, clicking a link on a webpage.

Secondly, is there a way to do the opposite? Have a topic Export a text string or some data to a webpage?

http://www.byond.com/developer/forum/?id=394116 will accomplish your first request.

As for exporting to a webpage, world.Export() already can do this.
In response to Murrawhip
Is there a way to do this without PHP?
In response to Mista-mage123
Mista-mage123 wrote:
Is there a way to do this without PHP?

Absolutely, but I haven't seen any around. What language are you needing?
In response to Murrawhip
Murrawhip wrote:
Mista-mage123 wrote:
Is there a way to do this without PHP?

Absolutely, but I haven't seen any around. What language are you needing?

Unfortunately my crap sitehost only supports javascript, html, CGI/Perl, and css.
In response to Mista-mage123
Mista-mage123 wrote:
Murrawhip wrote:
Mista-mage123 wrote:
Is there a way to do this without PHP?

Absolutely, but I haven't seen any around. What language are you needing?

Unfortunately my crap sitehost only supports javascript, html, CGI/Perl, and css.

I have very little experience with Perl but I'm sure someone could take a crack at porting the PHP to Perl.
In response to Mista-mage123
Mista-mage123 wrote:
Murrawhip wrote:
Mista-mage123 wrote:
Is there a way to do this without PHP?

Absolutely, but I haven't seen any around. What language are you needing?

Unfortunately my crap sitehost only supports javascript, html, CGI/Perl, and css.

This works fine for me though it could probably be a lot better. I've never used Perl before :/

#!/usr/bin/perl

use Socket;
use IO::Socket::INET;
sub export
{
$addr = $_[0];
$port = $_[1];
$str = $_[2];
if (substr($str, 0, 1) != "?")
{
$str = "?" . $str;
}
$query = "\x00\x83" . pack("n",length($str)+6) . "\x00\x00\x00\x00\x00" . $str . "\x00";
my $sock = new IO::Socket::INET
(
PeerAddr => $addr,
PeerPort => $port,
Proto => 'tcp'
);
die "Could not create socket: $!\n" unless $sock;
$bytessent = 0;
while($bytessent < length($query))
{
print $sock substr($query,$bytessent);
$result=<$sock>;
if(!$result)
{
die "Unable to transfer requested data";
}
$bytessent += $result;
}
close($sock);
}
export("127.0.0.1",some port,"String to send to server");
In response to Murrawhip
Thank you very much!

That should do wonders for me. If anybody else is familiar with the language and wants to tweak the script, let us know!

P.S: And I haven't used Perl either, which sucks because now I have to find out how to integrate the perl script in my site, LOL. (I can figure that out on my own time >.>)

Thanks again for the time and effort, I can't tell you how much I appreciate it.