PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
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.
<?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##";
?>
<%
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.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
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!