Jump to content

Run Console script with PHP


bujaman

Recommended Posts

OK, I am a newbie to PHP. I have been working on a website using WordPress and need to run a small script to generate registration codes for a website. The customer enters a number generated by the downloaded software onto this webpage:

 

http://www.blindbidpro.com/register/

here is an example of a computer code: BC79-2AAE-9628-8892

 

and a registration number is supposed to be generated. The problem is the provider of the software has an ASP solution, but my server doesn't support ASP pages. I am trying to change the ASP code into PHP, but I have no experience in either of these languages. Any help would be great! Here is a link to the software providers explanation of what needs to happen:

 

http://www.LockXLS.com/help/index.asp?topic=ht_keygen

 

and here is the ASP code I already have:

<%@ Language="JavaScript" %>

<html>
        <head>
        <style type="text/css">
                .myText {font-family:Verdana; font-size:10px;}
        </style>
        </head>
<body>

<%

var sComputerCode = String(Request.Form("sCC"));
var sActivationCode = "";

var commandLine = "http://www.blindbidpro.com/validate/KeyGen.exe 80311927548D0E53 " + sComputerCode;

var WshShell = Server.CreateObject("WScript.Shell");

var oExec = WshShell.Exec(commandLine);

while( !oExec.StdOut.AtEndOfStream )
{
        sActivationCode += oExec.StdOut.Read(1);
}

WshShell = null;

%>

<div class="myText" style="width:100%;" align="center">

Thank you for generating Activation Code.

<div style="height:30px;"></div>

<table class="myText" style="border:solid 1px gray;">
<tr>
<td>
Computer Code </td><td><b> <% Response.Write( sComputerCode ); %></b></td>
</tr>
<tr>
<td>
Activation Code </td><td><b> <% Response.Write( sActivationCode ); %></b></td>
</tr>
</table>
</div>

</body>
</html>

Link to comment
Share on other sites

I think people are more inclined to give specific help for a problem rather than write a solution for you, although you may be lucky.

 

Have you thought about hiring a programmer or getting some php professionals to submit a quote for what you need? There are websites where you can describe your requirements and then get a programmer to sort it out for you.

 

Maybe even the hosting company would help you for a small fee, most have technical bods who can do that kind of thing.

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.