| | |||||
| ||||||||
| Programming PHP, Perl, Ruby on Rails, AJAX, HTML, XHTML, CSS, JavaScript, MySQL and any other coding topics. |
![]() |
| | LinkBack | Thread Tools |
| | THREAD STARTER #1 (permalink) |
| General Bill ![]() Join Date: Nov 2003 Location: Tampa, FL
Posts: 878
![]() ![]() ![]() | Convert PHP to ASP How would you convert this function to asp: PHP Code:
__________________ A good name is rather to be chosen than great riches, and loving favour rather than silver and gold. Proverbs 22:1 |
| |
| | #2 (permalink) |
| Master Your Domains Join Date: Mar 2003 Location: Watertown, MA
Posts: 222
![]() | Hi, Bill... no time to debug or test it, but this should be the right general direction... Code: Function helloWorld()
dim text1,text2,param,stuff
dim handle
text1 = "hello world"
text2 = "goodbye world"
MySer = Server.CreateObject("WDDX.Serializer.1")
handle = Server.CreateObject("Msxml2.ServerXMLHTTP")
If (Request.QueryString("yea")) Then
If (Mid(Request.QueryString("yea"), 0, 3) === "yea") Then
helloWorld = MySer.Serialize(array(text1,text2));
End If
End If
param1 = Server.URLEncode(text1)
handle.open "GET", param1 & param2, False
handle.send
stuff = handle.responseText
handle = Nothing
helloWorld = stuff
End Function ????: NamePros.com http://www.namepros.com/showthread.php?t=56041 ~ Nexus
__________________ FreeWho.com - Free Internet Tools!
Last edited by Nexus; 11-18-2004 at 01:51 PM.
|
| |
| | THREAD STARTER #3 (permalink) |
| General Bill ![]() Join Date: Nov 2003 Location: Tampa, FL
Posts: 878
![]() ![]() ![]() | Thanks, I'm going to check this out later... I really appreciate your help.
__________________ A good name is rather to be chosen than great riches, and loving favour rather than silver and gold. Proverbs 22:1 |
| |
| | #4 (permalink) | ||||
| Senior Member Join Date: Jun 2003 Location: Naperville Illinois
Posts: 1,786
![]() ![]() ![]() ![]() | Is ASP just like VB?
__________________
| ||||
| |
| | #5 (permalink) | ||||
| Senior Member Join Date: Aug 2004 Location: Washington
Posts: 4,327
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() |
__________________ Download youtube videos at www.HugYouTube.com -NO LINKS TO PARKED PAGES- Anonymous access at www.Banned.net | ||||
| |
| | #6 (permalink) | ||||
| Master Your Domains Join Date: Mar 2003 Location: Watertown, MA
Posts: 222
![]() |
????: NamePros.com http://www.namepros.com/showthread.php?t=56041 Bill, if you weren't bound by the above (your code is nastled in a bunch of other VB code), I'd use Javascript for your language interpreter. PHP is much easier to port to Javascript than VBscript. You get to keep your "{" and "}" structures, and your ";" at the end of your lines. ~ Nexus
__________________ FreeWho.com - Free Internet Tools! | ||||
| |
| | THREAD STARTER #7 (permalink) |
| General Bill ![]() Join Date: Nov 2003 Location: Tampa, FL
Posts: 878
![]() ![]() ![]() | If I serialize an asp array with this: helloWorld = MySer.Serialize(array(text1,text2)); Can I unsearialize it with php unserialize?
__________________ A good name is rather to be chosen than great riches, and loving favour rather than silver and gold. Proverbs 22:1 |
| |
| | #8 (permalink) |
| Master Your Domains Join Date: Mar 2003 Location: Watertown, MA
Posts: 222
![]() | Not really... put you'd be able to convert it. The MS serialization method "serializes" to XML. If you have a particular XML to array function you use in PHP, then that would solve it. I have one I use I could pass to you. You'd just need to compare the array you're expecting with the array you get (from doing this), and adjust it however necessary. ~ Nexus
__________________ FreeWho.com - Free Internet Tools! |
| |