Forum Moderators: open
I am looking for some thoughts on how best to achieve the following.
It goes a little beyond my amatuer hacker of scripts knowlege :)
I have a site which takes in payments using a third party (worldpay) for a subscription service.
Upon payment at worldpay a script is triggered on my server which adds the member details to my own db, sends the join up an email then response writes info back to the worldpay hosted viewable page.
All the above works fine.
However I now need to make an insert call to a third db hosted on a further suppliers site.
For the curious the third site provides us with a telephone service where each of our members gets a member number and pin.
Pin numbers etc are controlled on their server so I need to auto insert new randomly generated pins and member numbers to their db at the time of joining.
They have given me an insert script url along the lines of
[123.123.123.123...]
in place of the *'s I of course will add in the randomly generated pin numbers etc.
I do not want the subscriber seeing any kind of browser response from the telephone site.
ie it should be a hidden back ground process. telephone update script is set not to produce a browser response.
My query is... how do I go about calling this script?
is it something I can tag into my current script or do I need some form of passing of info to a second script?
Looking into this further myself I read about Server.Execute(path) and Server.Transfer(path)
seems however these only work if trying to call a script on the same server.
Is there something similar that will permit me to execute a script on a third party server?
If not possible in asp I thought I could perhaps work around using the server.execute to call eg a perl or php script on my server. ie if it can be easily done in another language other than asp.
All thoughts and ideas appreciated on how best to tackle this problem.
cheers
Mick
PS what I have currently is written in asp vbscript
I would use the XMLHTTP component in your script to get the webserver to call the remote page. This procedure would be completely transparent to your subscribers, and no output would be returned to them (unless you want it to).
Something along the lines of the following should work:
Set xml = Server.CreateObject("MSXML2.XMLHTTP")
with xml
'---- Opens the connection to the remote server
.Open "GET", "http://123.123.123.123/update.pl?a=****&b=***** ", false
.Send() '---- Sends the request and returns a response
If err.Number <> 0 then
' send the user a message or an email to the admin?
.abort()
Else
'No error, assume the 3rd party site is updated.
End If
End With
Set xml = Nothing
It needs IIS5 to work - but if you're using server.transfer - then you must be hosting on that platform!
HTH,
JP