Extension Development Trouble
This is an open discussion with 1 reply, filed under Extensions.
Search
I’ve just thought, is fsockopen() similar to fopen()?
If so, how can I force my $ch->exec() to use that instead of curl? Also, does this return a string too, or a resource (as that is what fopen() returns in my csv function)
I hope this makes sense?
Create an account or sign in to comment.
Right, I’m having issues developing an extension…
Basically, what I’m doing is modifying Brent’s Dynamic JSON datasource to work with CSV files instead. I have all the right functions, which initially rely on fopen() and fgetcsv(), but as it’s a datasource, I can’t use them… What I need is an array like fgetcsv() returns.
The first problem I’ve run into is that the Gateway class returns a string, and replaces my newlines or returns for spaces, which breaks my CSV. Is there any way to get it to return an array of strings instead? Or would I have to modify that Class to do that? An array of strings is what fgetcsv() returns, which I can then iterate over.
Any thoughts?