Reply to Getting around a restricted connection from an external computer

Your name:

Reply:


Posted by Ian Davies on 09/27/50 11:30

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
be
>able 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)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация