Forum Moderators: coopster

Message Too Old, No Replies

Run php script from other server hidden

         

StoutFiles

12:47 pm on Sep 8, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have two servers, A and B. Only server B has the php libraries to run a php script that generates an image. Server A embeds this image from server B.

When a user clicks a button on server A, how can I run the php script hidden on server B to generate a new image for A to show?

brotherhood of LAN

12:55 pm on Sep 8, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Use curl or similar to call a URL on server B. Make it so that a secret password/cookie string is needed in order to fulfil the request.

penders

2:03 pm on Sep 8, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



If your script is returning an image that you want to show, then can you not do something like...

<img src="http://www.serverB.com/my-script.php" alt="">


?

brotherhood of LAN

3:04 pm on Sep 8, 2011 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



That'd be an easier way penders but it'd make server B's URL public.