Page 1 of 1

HELP! Convert to Classic ASP?

Posted: Mon Dec 06, 2010 3:00 pm
by digoxy
Can anyone please convert this to classic ASP please? I would surely appreciate it. as it is, I know nothing about PHP, this, I wish I could do as easily as some of you guru's. :)

Code: Select all

<?php
$GAME_VERSION = 1; //Please use int only: 1,2,3,4)
$platform = $_POST['platform'];
$clientsversion = $_POST['clientsversion'];
if($platform=='WindowsEditor' || $platform=='WindowsPlayer'){
$downlink= 'http://www.MYWEBSITE.com/LatestWindowsUpdate.zip';
}else if($platform='OSXEditor' || $platform='OSXPlayer' ){
$downlink= 'http://www.MYWEBSITE.com/LatestMacUpdate.zip';
}else{
echo 'Invalidplatform!';
exit();
}/
/Format:VERSION#FORCEUPDATE#DOWNLOADLINK#DISABLEDLI
//Version: version info // Forceupdate: Leave this to 0 (ALWAYS update)
//DownloadLink; the link to the .zip for this platform
//DisabledLink: Used when i.e. the patcher would need to be updated.
// Asks the user to visit this link with explanation. Leave this blank otherwise!
echo "$GAME_VERSION#0#$downlink##";
?>




Re: HELP! Convert to Classic ASP?

Posted: Mon Dec 06, 2010 3:22 pm
by AbraCadaver
I don't have any way to test it, and it's been a long time for me with vb, but here's my stab at it:

Code: Select all

<%
GAME_VERSION = 1 ' Please use int only: 1,2,3,4
platform = Request.Form("platform")
clientsversion = Request.Form("clientsversion")

if platform = "WindowsEditor" Or platform = "WindowsPlayer" then
  downlink = "http://www.MYWEBSITE.com/LatestWindowsUpdate.zip"
else if platform = "OSXEditor" or platform = "OSXPlayer" then
  downlink = "http://www.MYWEBSITE.com/LatestMacUpdate.zip"
else
  Response.Write("Invalidplatform!")
  Response.End
end if
' Format:VERSION#FORCEUPDATE#DOWNLOADLINK#DISABLEDLI
' Version: version info
' Forceupdate: Leave this to 0 (ALWAYS update)
' DownloadLink; the link to the .zip for this platform
' DisabledLink: Used when i.e. the patcher would need to be updated.
' Asks the user to visit this link with explanation. Leave this blank otherwise!
Response.Write(GAME_VERSION & "#0#" & downlink & "##")
%>
This is sloppy but it is just a translation of the sloppy PHP :-) Also notice that clientversion is never used.

Re: HELP! Convert to Classic ASP?

Posted: Mon Dec 06, 2010 5:17 pm
by digoxy
Thank you for the quick reply, I will test this as soon as I get a few minutes! will check back as soon as I can..

Re: HELP! Convert to Classic ASP?

Posted: Mon Dec 06, 2010 7:58 pm
by digoxy
It worked fine! Thank you. I only had to add one end if!

The clientversion is future, its a work in progress from what I understand. But, I should be able to debug it now if I get more php, I can refer back to this to see what you did! :)

Very much appreciated.