Sending a global variable from a non SC application

All,
I am having to use a non scriptcase application to send a global variable into a grid application.

I tried just using the url like this
http://mytestgrid.php?12345
where the grid application should be using 12345 as the global variable…

any ideas why or how to accomplish?

Kevin

Call your app this way:

http://domain/yourproject/yourapp/?somevalue=12345

Then, in your code, you can access it with [somevalue]


echo [somevalue]; // will print 12345

Be aware that this is a (very) unsafe way of passing variables if you have some critical things to do in your application. Be sure that you know the caller and - better - encrypt the values.

Albert, any example for encryption for this case??

You can encrypt with a passphrase…this way, If data is encoded with tje same passphrase its suppose caller is known. You can implement too a token system. A petition with user pass, anf If valid, you return a token (hash). All petition from a token not known are ignored. There are different ways to do it

Giu, i asked for example dear, not a scary movie :smiley:

thanks a lot for the info, just kidding, that is the ideal but obviously isn’t easy task.

cheers

There are a lot of php functions to encrypt data or to create a strong hash regarding the string. if you have the opportunity in your ‘foreign’ application to calculate a hash depending on the parameters to be send and add that as a separate urlstring you can decrypt and recalculate it in the scriptcase application. That way (if you keep the key secret) you can verify the calling application. You will end up like something: myscapp.php?myparm1=hello&myparm2=something&phrase=ae33fc12
As soon as somebody is calling your app directly you will be able to ignore the call.

Within SC this is done automatically on links.