473,399 Members | 3,656 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

Getting around a restricted connection from an external computer

Hello Stefan or anyone else who can help

Some time ago you suggested a solution to my original post about connecting
to data on a remote server from a VB application where my host doesnt allow
a direct external contact. Your solution is below. However my host doesnt
support ASP on the Linux server my site is on. My question is do you know
how to acheive the same thing with php?

Ian

Hello
My host does not allow external connections to my MySQL database on their
server from a remote computer. I would like users of my VB application to beable to add records from a table on said database to their local MySQL
database. Can anyone advise me of my options to solve this one (appart from
changing host)?

Thanks
Ian


Create an ASP that queries the database and saves the recordset to the
response
object. This method assumes the information is encrypted in the db if it's
sensitive.
ASP:
<%Option Explicit%>

<!--#include file="inc/asp_head.asp" -->
<!--#include file="inc/asp_connect.asp" -->
<%Dim rs: Set rs = cn.Execute("get_OnlineEntries " &
LikePhrase(ValidateInputString(Request.QueryString ("ShowTitle"),"")) & "," &
LikePhrase(ValidateInputString(Request.QueryString ("ShowDates"),"")))
rs.Save Response: rs.Close: Set rs = Nothing: cn.Close: Set cn = Nothing%>

VB app:

Public Function GetOnlineEntries(ByRef sURL As String) As Variant

Dim rs As ADODB.Recordset: Set rs = New ADODB.Recordset: rs.Open sURL
If (Not rs.EOF) Then GetOnlineEntries = rs.GetRows: If (Not rs Is Nothing)
Then rs.Close

End Function

mURL = "http://" & frmMain.IP_Main & "/getonlineentries.asp?ShowTitle=" &
URLEncode(frmMain.ShowTitle) & "&ShowDates=" & URLEncode(frmMain.ShowDates)
Dim moe: moe = GetOnlineEntries(mURL)
mbOnlineEntries = IsArray(moe)

Oct 27 '05 #1
2 1821
On Thu, 27 Oct 2005 12:29:10 GMT, "Ian Davies" <ia********@virgin.net> wrote:
in <qK******************@newsfe1-gui.ntli.net>
Hello Stefan or anyone else who can help

Some time ago you suggested a solution to my original post about connecting
to data on a remote server from a VB application where my host doesnt allow
a direct external contact. Your solution is below. However my host doesnt
support ASP on the Linux server my site is on. My question is do you know
how to acheive the same thing with php?

Ian


Hi Ian-

Sorry, I can translate from PHP to ASP but since I don't currently have a Linux
box to test on there's not much I can do to help you. Ask in a PHP forum how to
save a recordset to the response object.

---
Stefan Berglund
Oct 27 '05 #2
| Hi Ian-
|
| Sorry, I can translate from PHP to ASP but since I don't currently have a
Linux
| box to test on there's not much I can do to help you. Ask in a PHP forum
how to
| save a recordset to the response object.
|
| ---
| Stefan Berglund

hey stefan! it's good to see you're still alive and posting vb goodies.

btw, the op not only posted to a php ng but also to every computer related
ng i can think of. ;^)

anyway...from an architectural standpoint when working cross-platform, i'd
recommend using web services to make the data consumable...be it from a
php/asp script, gui app, or a proc run on a cron. at that point, each has
enough information to get/publish/consume the data in a manner appropriate
to its given environment (including language)...and without a bunch of
system-specific caveats along the way.

of course i do have other suggestions...but a direct translation is not one
i'm going to afford now.

hth,

me
Oct 28 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

303
by: mike420 | last post by:
In the context of LATEX, some Pythonista asked what the big successes of Lisp were. I think there were at least three *big* successes. a. orbitz.com web site uses Lisp for algorithms, etc. b....
1
by: Ian Davies | last post by:
Hello My host does not allow external connections to my MySQL database on their server from a remote computer. I would like users of my VB application to be able to add records from a table on...
4
by: Odd Bjørn Andersen | last post by:
I have installed DB2 9 Enterprise Edition on my laptop (Windows xp prof. ed.). But when I try to connect to any of my local databases I get this error: SQL30082N Security processing failed with...
5
by: Tom | last post by:
I have a function that restricts access to a page to logged in users. When a user who isn't logged in goes to the page, it will dynamically generate a login form. I'm trying to use it in...
8
by: Steven D'Aprano | last post by:
I have a PC behind a firewall, and I'm trying to programmatically determine the IP address visible from outside the firewall. If I do this: '127.0.0.1' ('localhost.localdomain', , ) I get...
0
by: rich | last post by:
Hi all, I have a fairly complex "feed" application that recieves messages from an external user-supplied API via a callback function, and attempts to forward these messages to another...
41
by: LayneMitch via WebmasterKB.com | last post by:
I was just chating with a few webdevelopers and it was brought to my attention that I need some type of server technology installed on my computer so I could get a visual of how my sites would look...
9
by: KDawg44 | last post by:
Hi, I have PHP function that adds a record to the database. The table has an ID that is AUTO_INCREMENT. Is there anyway to get that ID back when I do any kind of insert? That ID is a foreign...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.