Groups | Blog | Home
all groups > flash actionscript > april 2004 >

flash actionscript : help with asp to php


talltyler
4/9/2004 10:59:17 PM
Below is some asp stuff that just gets some weather info from a server. I was
just getting it directly from the site but flash isn't down with cross site
exchanges so I need to remake this script below but what I have tried doesn't
work. What is the xmlHTTP thing. All this script is doing is entering a zip and
returning the info from a site. seems easy.

<%
Dim weatherURL
Dim weatherPath
Dim weatherZip
Dim weatherGet
Dim weatherData
Dim xmlHTTP

Set xmlHTTP = Server.CreateObject("Msxml2.XMLHTTP.4.0")

If Request.Form <> "" Then
weatherZip = Request.Form("zipCode_txt")
Else
weatherZip = Request.QueryString("zipCode_txt")
End If

weatherURL = "http://www.ejse.com"
weatherPath = "/WeatherService/Service.asmx/GetExtendedWeatherInfo?zipCode="
weatherGet = weatherURL & weatherPath & weatherZip

xmlHTTP.Open "GET", weatherGet, False
xmlHTTP.Send

Response.Write xmlHttp.ResponseText
%>

It seems easy but I am just forgetting something.
Thank you.
talltyler
4/10/2004 4:50:26 PM
if this helps any here is what you get after you run it through a converter but
the xmlHTTP thing isn't being delt with right

<?
// $xmlHTTP is of type "Msxml2.XMLHTTP.4.0"

if ($HTTP_POST_VARS!="")
{

$weatherZip=$HTTP_POST_VARS["zipCode_txt"];
}
else
{

$weatherZip=$HTTP_GET_VARS["zipCode_txt"];
}

$weatherURL="http://www.ejse.com";
$weatherPath="/WeatherService/Service.asmx/GetExtendedWeatherInfo?zipCode=";
$weatherGet=$weatherURL.$weatherPath.$weatherZip;
$xmlHTTP->Open"GET"$weatherGet$False;
$xmlHTTP->Send;
print $xmlHttp->ResponseText;
?>

THank you for any help that you can give me.

AddThis Social Bookmark Button