473,382 Members | 1,635 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,382 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 1818
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.