Re: Send binary data to socket

From: Marco (dont_send{spam}[mps)
Date: 12/10/04


Date: Fri, 10 Dec 2004 00:32:49 +0100

Ok.. Seems the information was too little :-)

here we go with a little more info:

A friend of mine as programmed a simple popup kind of thing.
I made a scheduler in PHP, but to assure we don't forget any todo-items I
thought it would be a nice feature to let this scheduler (running on LINUX
server with apache/PHP) send messages to (in this case) my windows machine.
(e.g: call php page with aid of crontab)

Now, this friend has a reputation with Delphi (pascal) and programmed a nice
little popup application.
To use it I have to connect to (if local) 127.0.0.1 port 12345 (with SSH /
putty raw connection) and after entering the Tilte of the popup, text and
the final POPUP command, I see a nice popup with the text I entered...

...
So the commands entered in the PUTTY window are quite simple:
TITLE Title of popup window
TEXT text in popup window
POPUP

Now what I have to do (in php duh..) is sending these commands to the
client..............
So my thought would be creating a socket to the (windows) machine with the
popup-thing running and send the commands..
But it just doesn't seem to work..

If anyone of you can help me out.. PLEASE!! :-)

Thanx in advance,
  Marco

"Quarco" <dontbother@hotmail.com> schreef in bericht
news:41b86bfc$0$566$e4fe514c@news.xs4all.nl...
> Hi,
>
> Quick & simple question:
> I have to send the next data to a socket in order to make a popup visible
> on
> a windows machine..
>
> TITLE Title of popup [enter]
> TEXT Text in popup [enter]
> POPUP [enter]
>
>
> <?
> $s=socket_raw_connect($host,$port,15,'TITLE Test \nTEXT Text in
> popup\nPOPUP\n');
>
> function socket_raw_connect ($server, $port, $timeout,$request) {
> if (!is_numeric($port) or !is_numeric($timeout)) {return false;}
> $socket = fsockopen($server, $port, $errno, $errstr, $timeout);
> if(!$socket) { echo "Opening socket error"; exit(); }
>
> sleep(10); #Wait for program... bug :-)
> $put=fputs($socket, $request);
> sleep(10);
> fclose($socket);
> }
> ?>
>
> Now, I have tried the whole scala of \r \n \r\n \0x0a etc.. for \n but it
> doesn't seem to work..
>
> Anyone a bright idea???
>
>
> Thanx in advance,
> Marco
>
>
>
>



Relevant Pages

  • WARNING - Long Reply Re: Pop ups keep getting through - and they are driving me NUTS
    ... need to block these with a firewall as a general protection measure. ... Messenger Service Window That Contains an Internet Advertisement ... provide popup messages to users. ... Make sure that you are up-to-date on ALL critical Windows ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: Harddisk Problems
    ... To start the Recovery Console, start the computer from the Windows 2000 ... Setup CD or the Windows 2000 Setup floppy disks. ... | Source: Application Popup ... | Application popup: SyncBack.exe - Corrupt File: The file or directory ...
    (microsoft.public.win2000.advanced_server)
  • Re: virus? WARNING - Long Reply
    ... connected to the Internet with a title bar reading "Messenger Service", ... need to block these with a firewall as a general protection measure. ... provide popup messages to users. ... Make sure that you are up-to-date on ALL critical Windows ...
    (microsoft.public.win2000.registry)
  • Re: disabling Internet popup messages
    ... All versions of Windows since.. ... That is an Internet Web PopUp.. ... To enable or disable Internet Connection Firewall ...
    (microsoft.public.windowsxp.security_admin)
  • Re: Pop ups
    ... > and as soon as it logs on I get at least one popup. ... scan with HijackThis. ... If you are running Windows ME or XP, ... System Restore point from the More Options section of Disk Cleanup ...
    (microsoft.public.windowsxp.security_admin)