Api notification to trigger php script help

I’m using s2 member free at moment but will probably upgrade. My wordpress knowledge and php is poor but s2member seemed ideal choice to get my new project going.

I have set up site and s2member but want the registration process to create a new account with another company i am a reseller for.

So i have the php script to send these details through, where in my site do i load this php script
resources say www.example.com/myscript.

so i create a script (helloworld.php)
create a directory in wp-content called dmg

The wordpress website hosted on 1and1 and with filezilla it says path is;

sftp://u87xxx2188@home657xxxx11.1and1-data.host/app661419630/wp-content/dmg/helloworld.php

which doesn’t make a lot of sense to me.

Am i uploading the file to the wrong place?

the above is simplified as i know i need the path of my site to the php script and passing on of username etc into the script . but i’m obviously missing something here on where to place the php file and what the path would be.

appreciate help

thanks in advance

dunc

Duncan, could you make it a bit clearer what you are trying to do? Forget the script for a moment; just explain what you’re trying to achieve.

hi, i’ll try
i have website with s2member on and working.

i have a reseller business with a company where i can create accounts for my clients, and i am trying to automate the process through s2member. I want to set this up so, once the customer subscribes to my website using s2member, i can trigger the php file to create the client an account with my reseller.

On watching this video https://www.youtube.com/watch?v=Xg9nuPwa9_0 it appears that i can achieve this with s2member api for registration.

I have the code from the reseller in a php file that needs to run after customer registers there subscription,

so the question is where should i put this php file from livedrive in my wordpress website and how can i trigger it.

i hope that has made it more clear.

many thanks for your help on this :slight_smile:

Duncan, I believe that you should be able to put that PHP file wherever you want. Then you put its URL into the Signup Notification box at API/Notifications

hi

its the url i’m having a problem with;
if i upload the php file with filezilla

you will see that lowerdown is the php file index.php if i get the url for that by right clicking on the file and clicking properties i get the url sftp://uxxx02188@home6xxx7911.1and1-data.host/app661419630/index.php

i have xxx a few numbers out for security.

so the url is nothing like www.example.com/index.php i would expect.
hence me asking if i should be loading the file in a specific place, eg in the root folder of ./
or in the folder wp-asmin or wp-content in order to set the url as www.example.com/xxx.php with xxx being the file name.

It says on the video i need the full url but is this only the case if the file is stored on a separate website, i’m really confused on this

any help appreciated

You are getting the URL for accessing by SFTP. But you need the URL for accessing via http.

In your case, it looks like this will end with /app661419630/index.php so I’m guessing it will be something like www.example.com/app661419630/index.php

hi

i’ll have a play about and see how i get on, thanks for the pointers

hi,
this may help others as well, i could achieve a lot of what i was doing because my wordpress site was “managed” by 1and1 hosting which was advised for autoupdating/better security etc. because of this, various “writes/permissions were denied”.
This was discovered after a long phone call to 1and1 hosting and being talked through switching to a standard host package.

so the answers to the issues i had (with research and brain strain) are
php file to go inside the mu plugins folder
the website url is www.mysite.com followed by ? and then a (action) name to trigger the php file.
then followed by the extraction/parsing suchas firstname=%%firstname%%

better details are here as the video is lacking in detail

thanks for your help though

Thanks for the full explanation!

Also nice to hear something good about 1and1 for a change. I would always recommend a good managed WP host instead.