From: Merlin Morgenstern on
HI there,

I am thinking about building a partner network where partners can export
content to my server which will then be imported. It should be as easy
as possible for the partner and not rely on any special php functions.


The best way to do this I guess is to deliver them a php file which will
create a xml structure that I can import. The problem I have now is, how
to transfer this xml-file to my server? Of course I could do this via
FTP, but then they need to have FTP enabled inside their php
installation. This might scare some partners away.

Does anybody have a good suggestion on how to do this?

Thank you for any hint,

Merlin
From: =?ISO-8859-15?Q?S=E1ndor_Tam=E1s?= on
I'd use the POST method in HTTP. With this, on a simple page you can
read the XML file, and through the POST method, you can reach it. You
can put the XML in a POST variable, but you can also use File input
control in HTML to read and upload the file. You don't have to use FTP.

SanTa

2010.06.15. 12:00 keltezéssel, Merlin Morgenstern írta:
> HI there,
>
> I am thinking about building a partner network where partners can
> export content to my server which will then be imported. It should be
> as easy as possible for the partner and not rely on any special php
> functions.
>
>
> The best way to do this I guess is to deliver them a php file which
> will create a xml structure that I can import. The problem I have now
> is, how to transfer this xml-file to my server? Of course I could do
> this via FTP, but then they need to have FTP enabled inside their php
> installation. This might scare some partners away.
>
> Does anybody have a good suggestion on how to do this?
>
> Thank you for any hint,
>
> Merlin
>


From: Ashley Sheridan on
On Tue, 2010-06-15 at 12:00 +0200, Merlin Morgenstern wrote:

> HI there,
>
> I am thinking about building a partner network where partners can export
> content to my server which will then be imported. It should be as easy
> as possible for the partner and not rely on any special php functions.
>
>
> The best way to do this I guess is to deliver them a php file which will
> create a xml structure that I can import. The problem I have now is, how
> to transfer this xml-file to my server? Of course I could do this via
> FTP, but then they need to have FTP enabled inside their php
> installation. This might scare some partners away.
>
> Does anybody have a good suggestion on how to do this?
>
> Thank you for any hint,
>
> Merlin
>


You could allow them to upload XML files to your server with a plain
upload form.

I doubt though that'll you'll convince many people to setup a local PHP
installation for the purposes of creating one XML file. Setting up PHP
for the first time can be a tricky thing for a lot of people to do.

Thanks,
Ash
http://www.ashleysheridan.co.uk


From: Richard Quadling on
On 15 June 2010 11:00, Merlin Morgenstern <merlin_x(a)fastmail.fm> wrote:
> HI there,
>
> I am thinking about building a partner network where partners can export
> content to my server which will then be imported. It should be as easy as
> possible for the partner and not rely on any special php functions.
>
>
> The best way to do this I guess is to deliver them a php file which will
> create a xml structure that I can import. The problem I have now is, how to
> transfer this xml-file to my server? Of course I could do this via FTP, but
> then they need to have FTP enabled inside their php installation. This might
> scare some partners away.
>
> Does anybody have a good suggestion on how to do this?
>
> Thank you for any hint,
>
> Merlin
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

We have just done something similar. We went down the SOAP route as
this allows third parties to be able to take our WSDL file (which
describes the services we offer) and create their own code from it,
essentially wrapping the SOAP comms in a class of language x. I used a
slightly modified wsdl2php class from sourceforge to create my client
classes for our own service, rather than manually creating them, as a
proof of concept. So wsdl2java, wsdl2net (if such things exist) would
do a similar job.

For us, the biggest advantage of SOAP over say REST was that SOAP is a
documented standard (with all its faults). We can supply a single
document which is man and machine readable and fully describes our
service. Admittedly, we used the Zend SOAP, WSDL and AutoDiscovery
classes for all of this, so really, we did VERY little in terms of
creating the SOAPy bits.

We have an Authentication service and then a series of services which
retrieve and supply data. We incorporated version control into all the
classes. So, V1 is where we are today. As we increase functionality,
we can incorporate a "superseded by" mechanism, which the end-user can
take into account if they so wish. The WSDL file will have the latest
info, they can re-generate their classes from the WSDL file and then
take advantage of the new functionality.

If we find a problem which essentially breaks the contract, we can
kill a version. And if if has a superseded by, we are again,
automatically informing the client of the newer code.

Add to that live (default), test (we think this is what you asked for)
and dev (this is where we are at the moment if you really want to see
something) requests for a particular version. As dev becomes test, the
dev is "killed" and "superseded by" the test and then the same for the
test -> live (with test's not being killed).

So. A simple enough setup, but allows us to move at our own pace in
terms of further development, allows us to incorporate requests and
bespoke requests to meet the needs of our partners ... all good. And
it was good fun doing this. Admittedly, there were a few bugs in the
Zend code I had to fix (all patches have been supplied but awaiting
someone to commit them to the code).

Richard.

--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling
From: Richard Quadling on
On 16 June 2010 09:42, Merlin Morgenstern <merlin_x(a)fastmail.fm> wrote:
>
>
> On Tue, 15 Jun 2010 11:26 +0100, "Richard Quadling"
> <rquadling(a)gmail.com> wrote:
>> On 15 June 2010 11:00, Merlin Morgenstern <merlin_x(a)fastmail.fm> wrote:
>> > HI there,
>> >
>> > I am thinking about building a partner network where partners can export
>> > content to my server which will then be imported. It should be as easy as
>> > possible for the partner and not rely on any special php functions.
>> >
>> >
>> > The best way to do this I guess is to deliver them a php file which will
>> > create a xml structure that I can import. The problem I have now is, how to
>> > transfer this xml-file to my server? Of course I could do this via FTP, but
>> > then they need to have FTP enabled inside their php installation. This might
>> > scare some partners away.
>> >
>> > Does anybody have a good suggestion on how to do this?
>> >
>> > Thank you for any hint,
>> >
>> > Merlin
>> >
>> > --
>> > PHP General Mailing List (http://www.php.net/)
>> > To unsubscribe, visit: http://www.php.net/unsub.php
>> >
>> >
>>
>> We have just done something similar. We went down the SOAP route as
>> this allows third parties to be able to take our WSDL file (which
>> describes the services we offer) and create their own code from it,
>> essentially wrapping the SOAP comms in a class of language x. I used a
>> slightly modified wsdl2php class from sourceforge to create my client
>> classes for our own service, rather than manually creating them, as a
>> proof of concept. So wsdl2java, wsdl2net (if such things exist) would
>> do a similar job.
>>
>> For us, the biggest advantage of SOAP over say REST was that SOAP is a
>> documented standard (with all its faults). We can supply a single
>> document which is man and machine readable and fully describes our
>> service. Admittedly, we used the Zend SOAP, WSDL and AutoDiscovery
>> classes for all of this, so really, we did VERY little in terms of
>> creating the SOAPy bits.
>>
>> We have an Authentication service and then a series of services which
>> retrieve and supply data. We incorporated version control into all the
>> classes. So, V1 is where we are today. As we increase functionality,
>> we can incorporate a "superseded by" mechanism, which the end-user can
>> take into account if they so wish. The WSDL file will have the latest
>> info, they can re-generate their classes from the WSDL file and then
>> take advantage of the new functionality.
>>
>> If we find a problem which essentially breaks the contract, we can
>> kill a version. And if if has a superseded by, we are again,
>> automatically informing the client of the newer code.
>>
>> Add to that live (default), test (we think this is what you asked for)
>> and dev (this is where we are at the moment if you really want to see
>> something) requests for a particular version. As dev becomes test, the
>> dev is "killed" and "superseded by" the test and then the same for the
>> test -> live (with test's not being killed).
>>
>> So. A simple enough setup, but allows us to move at our own pace in
>> terms of further development, allows us to incorporate requests and
>> bespoke requests to meet the needs of our partners ... all good. And
>> it was good fun doing this. Admittedly, there were a few bugs in the
>> Zend code I had to fix (all patches have been supplied but awaiting
>> someone to commit them to the code).
>>
>> Richard.
>>
>> --
>> -----
>> Richard Quadling
>> "Standing on the shoulders of some very clever giants!"
>> EE : http://www.experts-exchange.com/M_248814.html
>> EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
>> Zend Certified Engineer :
>> http://zend.com/zce.php?c=ZEND002498&r=213474731
>> ZOPA : http://uk.zopa.com/member/RQuadling
>>
>
>
>
> They have PHP already installed as most of them are using PHPBB or
> another Forum Software.
> How could I allow them to upload XML directly to my server? I could
> provide them with a username and pw on the suse system, but then we have
> the problem that scp must be enabled inside their php version. Same
> problem again like with ftp.
>
> I am searching for a solution which will allow a standard php
> installation to transfer the xml file to my server with login and pw.
>
> Thank you for any further hints.
>
> Merlin
>
> --
> http://www.fastmail.fm - The professional email service
>
>

You can use a simple html form with a file upload. No extensions or
special permissions required for that.

If the form is loaded via https - that proves to THEM who you are. But
for this, you would need to buy a certificate (never done this - not
sure what/how/cost/etc.).

They provide a username and password first so you don't end up having
to receive a MASSIVE file BEFORE you have validated their credentials.

There is a detailed file upload explanation/example in the PHP manual
at http://docs.php.net/file%20upload - Make sure you read through all
5 sections here to get the full info. The user notes are also very
interesting.



--
-----
Richard Quadling
"Standing on the shoulders of some very clever giants!"
EE : http://www.experts-exchange.com/M_248814.html
EE4Free : http://www.experts-exchange.com/becomeAnExpert.jsp
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
ZOPA : http://uk.zopa.com/member/RQuadling