NOTICE: This version of the NSF Unidata web site (archive.unidata.ucar.edu) is no longer being updated.
Current content can be found at unidata.ucar.edu.

To learn about what's going on, see About the Archive Site.

[ldm-users] ldm piping to php scripts

good evening ldmers
for those of you that write your own php scripts and have ldm pipe to them if you use the following
like I did..
#/!/usr/bin/php//
//<?php//
//
//
//$fp = fopen('php://stdin','r');//
//$data = "";//
//while(!feof($fp)) {//
//     $data .= fgets($fp,4096);//
//}//
//fclose($fp);
/it was either a change in ldm or php that this no longer works.. (I would believe changes in php specifically my version 5.6.19)
after spending   a few days on google
and testing and testing..
I found the following works..

#/!/usr/bin/php//
//<?php//
//$data = stream_get_contents(fopen("php://stdin", "r"));/
so before any of you go batty when you upgrade php and your php decoders cease to work
I'd figure I'd save you the trouble..

-Jeff Lake
  • 2016 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the ldm-users archives: