Jump to content

Calling a php from another server


anshulmalhotra

Recommended Posts

Hi all,

 

I am trying to call a php file currently stored on my web hosting server to a HTML code being written on a different server.. This HTML code should be able to execute this php file and then retrieve a value that is getting stored in a variable named $url within the php file.. This variable is randomly generated each time the php file is run..

 

Please assist.. Kindly ask for more info as required.

 

Cheers

Link to comment
Share on other sites

You're going to run in to the Same Origin Policy which basically restricts server A remote code from running on server B.  API's and SDK get around this policy by using keys and single source signon schemes.  You can load a remote page in an <iframe> tag, however that code can't make runtime instructions without some special setup (reverse proxy server).  

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.