The New York legislation, which closely hews to a federal bill, would require internet companies to reveal who is paying and to show where content comes from.