it01y2
Nov 14 2006, 08:51 PM
| | I am currently making a game. And I want to use a command through php to ineract with a visual basic app on my server. Is it possible? and how? |
Reply
ghostrider
Nov 14 2006, 11:16 PM
I've been programming in VB for ten years, can you describe what you are trying to do with a little more detail? I think it is possible to do. PM me or post back and I'll help you out.
Reply
Plenoptic
Nov 15 2006, 01:49 AM
I was pretty sure that only ASP can interact with Visual Basic which would mean no unless you have a Windows Server for your hosting that supports ASP. I don't know really though I'm still relatively new to Visual Basic. Last I knew though it was only ASP.
Reply
ghostrider
Nov 15 2006, 03:28 AM
If what I think he is thinking about is right, its a simple enough concept. This is how I would approach it. 1. The PHP program writes some data to a file in some format. 2. The VB program constantly sees if a file is there for it to read. 3. The VB program processes it and puts the result back in another file. 4. The VB program deletes the original file. (so that the PHP program can create a new one later) 5. The PHP program opens the file the VB program wrote, and has the results. 6. The PHP program deletes the file. Another way I could see this working is using a Winsock control in the VB program, and then using the socket functions of PHP to connect to it and process the request. This technique seems more practical now that I think about it. Here is how I would write this one. 1. The VB program is constantly listening for connections. 2. The PHP program connects to the IP address 127.0.0.1 (your computers IP) or localhost 3. The PHP program sends what needs to be done to the VB one. 4. The VB program returns the data and closes the connection. The technique I wrote above seems more practical because it can handle multiple requests, instead of just one file. It probably is slightly faster (by a very small amount) because the computer doesn't need to write to the hard disk constantly. The opposite, using VB and calling a PHP program can be done. I am currently writing a game that will use this technique for match making. It works like this. 1. You have a PHP program that does a certain function and accepts its data through GET CODE <?PHP $variable = $_GET['mode']; // if you have the url, http://www.whateversite.com/phpprogram.php?mode=1, the $variable = 1. PHP?>
2. The VB program uses the Inet control, and sends the request. 3. The PHP program would output its result using the print() or echo() variable. I hope this helps you guys out a lot. I'll be happy to guide you along and answer any other questions you have.
Reply
matak
Jan 16 2007, 09:06 PM
You might find this question strange, but well, i'm a noob.. So it is possible to write programs in C, VB, put them on server and make them "work" and intereact to PHP ?! Any good tutorials on that, or any good simple free programs that do the same? (open source possibly...)
Reply
QuickSilva
Jan 17 2007, 04:56 PM
I also thought ASP was the only language that could interact with VB. I may be mistaken though. Have a great day! -Tom.
Reply
Galahad
Jan 30 2007, 06:34 PM
ASP is written in a language that has BASIC as it's foundation... Traditionaly, Microsoft IIS web server, was used to host ASP pages, and Apache was used to host PHP pages... There is a plugin (or module) for IIS and PWS that allows processing of PHP, but it's not that good, and it is very limiting in power, i believe PHP works only in CGI mode... Anyways, not to stray from the topic... There are few ways to connect VB with PHP scripts... Least efficient is through file, as ghostrider said... It's inefficient, since it consumes much CPU time, and thus we'll forget about it (I tried similar approach once, for connecting VB program, with QB program... Not good) Second method is by using MySQL for exchange of information... Connect VB to MySQL server, connect PHP script to MySQL server, and voila... Easy setup of information... This could be a good method, I'm using it for displaying some info on my site... May be non-efficient though, if too frequent queries should occur... Third method, again mentioned by ghostrider, involves using socket functions of PHP, to connect it directly to your VB application... A good method, probably the best option... The second part of it, transmitting data to PHP script, I would use POST method, not GET... First, GET metod has a limitation to its length (2K I believe), and POST is used to transfer large quantities of data... Here, I'm including code used to send data via POST methid, using Microsoft Internet Controls OCX... Just add it to your project, and use the following code: CODE Public Sub SendData(ByRef wb As WebBrowser, ByVal Params As String) Dim vPost As Variant Dim vFlags As Variant Dim vTarget As Variant Dim vHeaders As Variant Dim aByte() As Byte Dim i As Long
' Params are in the following format <param-name>=<param-value>[&<param-name>=<param-value>[&...]] PackBytes aByte(), Params vPost = aByte vFlags = &H2 Or &H4 Or &H8 Or &H10 vHeaders = "(anti-spam-(anti-spam-content-type:)) application/x-www-form-urlencoded" & vbCrLf wb.Navigate "http://your-server/php-script.php", vFlags, vTarget, vPost, vHeaders End Sub
Private Sub PackBytes(ByRef ByteArray() As Byte, ByVal PostData As String) Dim i As Long Dim j As Long Dim c As String
j = Len(PostData) - 1 If j < 0 Then Exit Sub End If ReDim ByteArray(j) For i = 0 To j c = Mid(PostData, i + 1, 1) If c = Space(1) Then c = "+" End If ByteArray(i) = Asc(c) Next End Sub This code is sure to send data to your script, via POST methid. You can ofcourse parse resulting webpage, and control your VB application taht way too... If you want, I can send you a DLL that you can use to connect with MySQL server, and read and write do MySQL databases, just PM me... Hope this helped a bit... Oh yeah, just remembered... Since Apache works (mostly, and preferably) on Linux, and VB applications can't do that (sadly  ), and I'm sure you won't be setting up PHP support on IIS or PWS, your applicayion would have to run on a separate server, running Windows, probably the best method would be to use combination of socket functions in PHP, and, depending on update rate you need, MySQL, or POST method of returning data to your script... Cheers
Reply
matak
Jan 31 2007, 02:51 AM
QUOTE(Galahad) Oh yeah, just remembered... Since Apache works (mostly, and preferably) on Linux, and VB applications can't do that i'm kinda noob programmer, but i found this post very interesting. i didn't remember that VB aps can be run only in windows environment so i posted this question. i won't learn Vb but C and C++ since it can be compiled both for linux and windows environments. My logic suggests me that C programs could be written to interact with php, and it's kinda logical couse php is written in C (i guess). So if at any time of my life i want to make an application in C to interact with PHP what would be the right way to do that!? It is so soon to talk about that for me, but you don't need to answer right now, and maybe there is more ppl interested in this subject so you could writte anyway. What is the difference between running PHP as Module or as CGI script, how is all of that conected with basic root program of PHP (what is root program of PHP, how can i start modifiying php, and is it smart to do that, just for fun, and for learning purposes) thanks
Reply
farsiscript
Jan 31 2007, 07:06 AM
Dear it01y2 You can transfer Data between VisualBasic and PHP via URL Like this : CODE $Somename = $_GET['someurl name']; or CODE $Somename = $_POST['someurl name']; But its better make code with GET Method In visualBasic You can generate one HTML page and form and make it for send data form game to server i read Galahad's post You can use it him code for vb
Reply
Similar Topics
Keywords : php, interact, visual, basic, app, server
- Archive.org The Public Domain And Basic Copyright
Archive.org is a great place to download old movies and things. (1)
Help With Compiling My Server
I can't compile it. IMPORTANT!! :( (0) Okay, so I downloaded JDK6.0 UPDATE 7, just like the tutorial said. Now every time I go to compile,
it says I am missing JDK! If someone could help me out, and if they are interested in become the
Head Mod of my private server, I have no problem with giving them those rights. I already made the
compiler but when I open it, and type "C" it won't compile because it says I don't have JDK
when I do. After I compile, I will run the server, then add some NPCs and change some stuff around,
and it will be complete! /smile.gif" style="vertical-align:middle" emoid....
The Other Hdd Does Not Appear On My Server
(2) I have a primitive Dell POwerEdge2300 that i got from a friend. I remember when he he gave it to me
5 months ago we ran Windows Server 2003 but when I switched it on yesterday it could not find any
boot device. After playing around with the hardrives it finally booted with Win2K which I had not
seen when we ran it the first time. The problem is when I am in BIOS I see both drives but when I
boot into windows only C:\ appears in Windows Explorer. I can see both drives in the device
manager and they are said to be working fine how do I access the other drive which I b....
Dohwow
4 my private server (2) how do i add php into the website im so lost ^^ /sad.gif" style="vertical-align:middle" emoid=":("
border="0" alt="sad.gif" />....
Private Servers
Private server discussions (16) The thing about MMORPG private servers, are that there are too many of them. Ask yourself: "Is it
worth creating a private server to attract player when there are already thousands out there?" "Is
it worth creating a private server and getting sued?" "Is it worth it to use up RAM and Internet to
host one?" "Is it worth it to get hacked?" "Is it worth it competing against other servers knowing
that they are much better than you?" Is it worth it in the end? I say, it is. When you're
creating a private server of your own, have a think about these things. ....
Print Server Help
problems with router/print server (0) Hi, wondering if someone can help me out with this... I'm trying to set up a router with print
server capabilities in my office. The router/switch has four LAN ports and a WAN port to connect it
to the modem/gateway (sorry if using wrong terms...). It also has a USB port where a printer can be
hooked up. Now, if I connect the WAN port to the corporate LAN network and a PC to one of its LAN
ports the router will assign a "subnet IP address" (e.g. 192.168.0.x) to the PC and the PC will thus
be able to access the internet and also to print, so far so good /wink.gif"....
Rsps Hosting?
rsps means runescape private server (0) can someone host a private server (runescape) for me?....
How To Install Sql Server Express In Package Deployment With Different Instance Name
(0) .NET programmer can easily build Setup and Deployment package using existing wizards in VS 2005 or
2008, thus when the setup.exe is run in client, it detects that whether SQL Express is installed or
not on the system, and it can install it if requires. The fact is, programmer does not have any
options such as - Changing the database instance name, the default instance name is SQLExpress and
cannot be changed (it is restricted) - Cannot change the SQL user and password - Thus this makes SQL
Express application hard to be configured automatically, and it causes programme....
Dedicated Server Package
(1) I am interested in a Dedicated Server package and I have a couple of questions. I don't see any
bandwidth restrictions listed on the order page. Are there any? Also, does this package include
cPanel and all of the usual commodities if I choose a linux OS? Thanks, Tim....
The Only Reason I Choose Ms Sql Server Rather Than Mysql
(0) The only reason i choose ms sql server rather than mysql is, MS SQL has more security
features!! MySQL is lacking a lot in my opinions - Lack in wide char, like nvarchar, I
developed some application to support chinese letter, and dont know how to build one in mysql - Lack
in t-sql syntax, like query in query is not fully supported - Does not have today SQL features like
BI support (today really required) And compare MS SQL to MySQL, the only reason why mysql is
favourable is - it is free! Dont u guys agree?....
Private Server
(1) Well Private servers first came into my mind a few years back when i asked someone about "Zezima" a
High Leveled Runescape Player, he said that "Zezima" Uses a Private "World" Which are Servers that
are hosted through out the Real World and then connect to a Login/Game Server. now a "Private"
Server I was wondering what it was and how we may get Access to that, well for one it would have to
connect to the official Runescape Game Server in order to see the Graphics and Game Details and so
on, this could not be possible because Runescape has a Web Browser based Client, but....
A Web Server On Lan
(9) Hey friends .. I m new to the forum and would like to ask for help. I have just started writing
script for web pages. I can make fairly good pages using HTML, PHP and for the backend database I
use MySQL. I live in a college hostel and my computer is connected to a LAN having about 300
computers. What I want is to make my web pages available to the LAN users...when I try to do so a
message appears.. u don't have permission to view on this server. I m doing this just for
curiosity and fun. I think this would be quit simple.....I don't know much about netw....
How To Make Your Own Counter Strike Source Dedicated Server!
(38) Ok, so you want to host your own CSS Server on your computer eh? Well you will not need a lot of
things, and it is very simple. All you will need is time. /biggrin.gif"
style="vertical-align:middle" emoid=":D" border="0" alt="biggrin.gif" /> I did this tutorial
myself, from my experience when I made my own CSS Server. This is just a simple tutorial! It
ONLY covers the basics of making a CSS server! Lets Get Started! /laugh.gif"
style="vertical-align:middle" emoid=":lol:" border="0" alt="laugh.gif" /> 1. Download the HLDS
Update Tool from here . 2. On....
Aob Blood Grouping
Few Basic Idea for all (4) AOB blood grouping is the most common blood grouping in present world. In this grouping blood
grouped depending on presence and absence of antigen A and antigen B in blood. Blood groups in AOB
system are A, B, AB and O. I am trying to explain this blood grouping system as easy as possible so
that the member of this site who has no science background can also understand the system. If any
blood contain antigen A but no antigen B, the blood group will be A blood group. If any blood
contains antigen B but no antigen A, the blood group will be B blood group. If any blood co....
I Have Install Windows 2003 Server
I want multiple user to login my server (5) I have install windows 2003 server and some application like iis, share point, etc.my development
time want remote desktop for few user so I want multiple user to login my server but I have not
install active directory and I dont want to install so tell me the best way to resolved the problem....
Tutorial On How To Compile Your Own Mangos World Of Warcraft Private Server.
A great way to learn about how big MMORPGs work and are built. (3) ==================== | Disclaimer Please read | ==================== This is an
educational project ONLY! It is NOT MENT TO BE RAN AS A PUBLIC SERVER! If you do run a
public server it MAY be against Blizzard's (World of Warcraft's parent company) EULA and you
will void any agreements including the right to play on their servers. They will DELETE YOUR ACCOUNT
and possibly ban you from their servers all together. I am writing this to help you learn what goes
into making a big time MMORPG and possibly get people into learning about video game prod....
Recommended Server-side Programming Language
(7) Hello, I'm starting to play with web design and stuff and would like a recommendation from this
knowlegeable forum on what is a good server side programming language. I've got some experience
in Java running PC-based applications but that's pretty much it, never done applets or anything
else. Also have been playing with perl and php. My use will be primarily creating records that will
be accesible by only using a password, what would be the best way to accomodate that? Thanks in
advance,....
Tutorial Build Your Own Cs Server 1.6 Steam
how to build counter strike server 1.6 Steam (16) This server is for Windows only . if u need tutorial to linux replay to the topic QUOTE
1.Download necessary files - HLDSUpdateTool - AMX Mod X 2.Install Server a) First we need to
create a New Folder, create this in C:\ with this name: HLDS. /cool.gif"
style="vertical-align:middle" emoid="B)" border="0" alt="cool.gif" /> Now open hldsupdatetool.exe
and install them in D:\HLDS. c) Now we most to create a shortcut at HldsUpdateTool.exe (from
D:\HLDS right click on icon and select Create Shortcut)., now we has created a shortcut
(she`s name i....
Runescape Private Server
How to make your own private server and make runescape cash with it :) (76) First off you need a source: You can download one of these. QUOTE Cheezscape 80 -
http://www.megaupload.com/?d=W8NCP0YC Cheezscape Pk - http://www.megaupload.com/?d=SOK1SPVR
Project 16 V.6 Edit 8 - http://rapidshare.com/files/10028200...DIT_8.rar.html Project 16 v3 -
http://www.megaupload.com/?d=ZFYG6T8B Project 16 Blitz -
http://d.turboupload.com/d/1544978/P16_Blitz.rar.html Project16 V.6 Full Source -
http://files.filefront.com//;5486316;;/ Project16 V.6 Full Source -
http://www.megaupload.com/?d=IAO4H58V Project16 V.6 Full Source - http://rapidshar....
Runescape 2 Private Server Guide: Part 2
No-ip setup (22) Overview: In part 2 i will describe how to set up no-ip. no-ip is a simple way of hosting a
private server and it is most commonly used. if this does not work, there is another way i will tell
about in part 3. part 2 and 3 are short, yet effective guides that are aimed at helping you! If
you are not sure if it is working, it is probably because you have not read part 4: Port Forwarding
Chapters: Chapter 1: What is No-ip? Chapter 2: Initial Setup Chapter 2 Section A:
Creating an account Chapter 2 Section B: The DUC Chapter 3: Config Chapter....
How To Make A Counter Strike 1.6 Dedicated Server
CS 1.6 Dedicated Server with Admin Mod and Stats Me (17) How to make a Counter Strike 1.6 Dedicated server What do we need ? HLDSupdatetool ->
http://www.steampowered.com/download/hldsupdatetool.exe NoSteamPatcher ->
http://www.gameszone.ro/downloads/no-won-steam.zip AdminMod + MetaMod ->
http://ovh.dl.sourceforge.net/source....50.60-win.zip StatsMe ->
http://ovh.dl.sourceforge.net/source....3-cstrike.zip Step 1 Create a dir were the server will be
installed example C:\HLDS Open hldsupdatetool.exe, click next , then I agree we will get to the
destination folder, here we press browse and select Local Disk C ,....
Private Server Ro .
How to create your own private Ragnarok-Online server !!! (159) I saw that there are a lot of people asking for how to create a private Ragnarok-Online server . so
now i decide to make this tutorial to to help these people ... i didn't have a server but my
friend had server and ihelped him to find pros and some tutos so , i learned with him how to create
a server ...stop making introduction ...let's go ... first you have to have minimum
requirements : ----Software :---- i think any windows should work, but i recommend Win Xp i
think you have alredy a Winrar *- Korean Ragnarok client *- Sakray patch (*i recommend the las....
how to make a pc server?
Tell Me (30) Me and a friend started a conversation over a place called mugglenet, and it states on the site that
it costs over $120,000 a year to run, and i found this verry difficult to believe...thats
10,000 a month, but anyways...i was wondering, what would one have to do to run their own servers
that they can host their websites on? their own servers that they can give @mugglenet.com e-mails
out to the thousands of fans that visit the website... because i believe that he could go out and
buy a server or a few servers for around 30,000-40,000 dollars for a one time payment, ....
How to setup DNS server in Linux Slackware
(5) Please help me how to set dns server in linuk slackware Moved from what is.. forum to operating
systems. Please note that what is... section is not to ask question but to explain things. Also,
Just writing these one-liners doesnt contribute much in the forum, so make sure that when you ask
question you have to be explain each and everything and then only someone will be able to help you. ....
Simple C File Handling In Action
Small code snipet which covers most of basic file handling and navigat (4) Yesterday I suddenly got a lot of work. The same work we try to push off, yes you are right all
formalities to get the code review incorporated and update all source code files with code review
headers. Imagine if you need to open 300 files one by one and append code review headers at the
end. Since most files are reviewed in groups of 20 to 30 files. We require one header to be placed
in say 20 to 30 files. To simplify I went back to my class assignment days and wrote this small c
utility to open all files passed on command line and open attach code review headers an....
Connection Error 800a0e7a On Win Server 2003 X64
(1) We have just set up a Windows Server 2003 x64 system for the purposes of being a dedicated web
server/media streaming server. Up to this point, we have been using Windows Server 2003 x86
environment and everything is running well. I have migrated the IIS settings over to the new server
and all appears to be going well when tested except that I have now lost all DB connectivity to the
3 small Access databases that I have in the server. All permissions and set ups are the same.
Based on past experience, I thought that it had to do with my Jet 4.0 drivers not being up t....
Wow Private Server
(3) Come and tryout my private server HellCraft server v1.8.0, v1.8.1, and v1.8.2 Homepage:
http://hellcraft.uni.cc account signup page: http://hellwowxxx.no-ip.info server address:
24.130.80.69 XPRate: very high Language: English Location: North-America Come play to the home
page to see how to play wow....
Who Thinks Trap 17 Is Th Best Server?
Who ever thinks replie back! (9) Man you what i think Trap 17 has good and strong Terms of Service that is good But i think they have
the best hosting program that i love about and it's the best! You know if you do not have
money right? And you what a good and madly good forum that is so much money you can not afford and
you wont it now! But Looking and thinkingno money! Some how you end up at trap17 the free
hosting server that provides free hosting forums and upgrades isn't that so cool?! Tell me
it is! /cool.gif' border='0' style='vertical-align:middle' alt='cool.gif' />....
[tutorial] Visual Basic 6 Minimize To Tray
Minimize to Tray (7) This example will "minimize" your program to the system tray when you click on a button, and restore
it when you click the system tray icon. For this example you'll need: 1 Form - Form1 1 button -
Command1 Add a Module to your project, and ad this code: CODE ' Create an Icon in System
Tray Needs Public Type NOTIFYICONDATA cbSize As Long hwnd As Long uId As Long uFlags As Long
uCallBackMessage As Long hIcon As Long szTip As String * 64 End Type Public Const NIM_ADD = &H0
Public Const NIM_MODIFY = &H1 Public Const NIM_DELETE = &H2 Public Const WM_MOUSEMOVE ....
[tutorial] Visual Basic 6
Closing Programs Right, Why END is bad (4) This tutorial applies to all those people who insist upon using "End" to close their programs: End
stops the program immediately without any thought as to what's going on - it's like a high
speed train hitting a brick wall. It can cause unwanted errors and is bad programming practice in
general. END gets rids of the form, but NOT its leftovers. This leaves a bunch of memory that will
still be in use even after your program has supposedly closed. An object or variable won't be
terminated properly - it's just not a graceful exit. The only time that it'....
Looking for php, interact, visual, basic, app, server
|
*RANDOM STUFF*
*SIMILAR VIDEOS*
Searching Video's for php, interact, visual, basic, app, server
*MORE FROM TRAP17.COM*
|
advertisement
|
|