Untitled

mail@pastecode.io avatar
unknown
plain_text
2 years ago
365 B
3
Indexable
Never
$header = 'SubscriberID:';

$stdin = fopen('php://stdin', 'r');

while ( $stdin && !feof( $stdin ) )
{
    $line = fgets( $stdin );

    $tmp .= $line;

    if ( substr( $line, 0, strlen( $header ) ) === $header )
    {
        list( $report_subscriber_id, $code, $account_code ) = explode( ';', trim( substr( $line, strlen( $header ) ) ) );

        break;
    }
}