Resquest Server question?

Could an app open on a webpage when a particular server requests a certain page???

Sorry, but you’ll have to give a little more information. Your question isn’t very clear.

If I build a application for a friends website and if i put a link to his website could there be a script for that application to open only when people click on the link from my site???

I can only think of 2 ways, neither of which is foolproof.

Use the HTTP referer header to test if they came from your page

  • can be spoofed or not sent

Use a GET variable

  • can be added to the URL and reused anytime

Thank you! How could it be done in PHP?

Basic stuff, just test for the SERVER and/or GET variables

if ( isset($_SERVER['HTTP_REFERER'])
 && ($_SERVER['HTTP_REFERER'] == 'my_site')
 && isset($_GET['my_var'])
 && ($_GET['my_var'] == 'my_var_val') )
{
  showMyWidget();
}

Thanks a lot really helpful!