Search code examples
pythonrequestcpanelweb-hostingdirectadmin

Request to Host DirectAdmin or Cpanel with python or ...?


I have a website on internet www.exampl.com and that set in DirectAdmin (or can set on Cpanel). How can I request to my table database?

In SQL with Python:

import pyodbc
db = pyodbc.connect ("Driver={SQL Server Native Client 11.0};Server=.;Database=DatabaseName Trusted_Connection=yes;")    
CUR = db.cursor() 
sql="SELECT Col1, Col2,Col3 from TableName"
CUR .execute(sql)
response=CUR.fetchone()

And done.

Is there a way?

In local database like SQL Server I send request to MySql database on my Host in internet and I receive my response.

enter image description here


Solution

  • I find my Answer on this link is video tutorial. Just set my IP dedicate or range Ip my ISP.