Jump to content

Recommended Posts

I read windows username by Vbscript. Now, I want to setup PHP Session against that username. For that I have to transfer that Vbscript variable to PHP. I can use GET method, but in that case, It'll not safe. Because anybody can directly type that get variable in address bar and thus login. So, is there any other way around to set up session against that username?

Sorry, but run all that by me again

 

just a little more detailed.

Like for instance, how were you planning on sending the variable by GET in the first place and maybe we could get somewhere. ;)

 

 

In other words....what's your vbscript output....or how does it work

If I send the variable via GET method, there is one problem. For example, i used the following code to get Windows username

<Script Language="VBScript">
Dim objNet
Set objNet = CreateObject("WScript.NetWork")
strInfo = objNet.UserName
Document.Location ="t1.php?username=" & strInfo
Set objNet = Nothing
</Script>

 

So, it will automatically redirect each user to his corresponding page. Like, for user X, it'll go to t1.php?username=X and for user Y, it will go to t1.php?username=Y. But, what happens if user Y type t1.php?username=X in his address bar? it will redirect him to user X's page, which will be a complete blunder!! mod_rewrite will not solve this. So, I am looking for a alternate way.

I work out one way. I put it for whom it may concern :)

 

I will have a form in HTML body which will have only one hidden field. On body load, I write the user name as the value of that hidden field via Vbscript. Then automatically submit the form (on body load) via javascript.

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.