473,472 Members | 2,155 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

command to update a web page

Hello All,
I have a python script which sends out email once a particular
condition is met. Now I want to extend the functionality and make this
script update a php web page with the same contents as those of the
emails it sends out.
What module /commands can help me acheive this?
Thanks.

Jul 19 '05 #1
4 1424
You probably just want to use ftplib to upload the new
page to the website. You will, of course, need to create
the new page from the information provided by whatever
condition triggered it prior to uploading to the server.

Alternatively you could update some information in a
MySQL database and have your php web page access that
information every time it refreshes. The database
would need to be hosted at the website (but most ISPs
now give you free MySQL anyway).

Sort of depends on how often this happens, how complex
the php page is, etc. as to which is best method.

Larry Bates
at*****@yahoo.com wrote:
Hello All,
I have a python script which sends out email once a particular
condition is met. Now I want to extend the functionality and make this
script update a php web page with the same contents as those of the
emails it sends out.
What module /commands can help me acheive this?
Thanks.

Jul 19 '05 #2
ncf
I can't begin to know too much about this subject, but Python has a
builtin httplib module which might be interesting to you. There is also
a ftplib if that is how you want to do it. Python's documentation seems
to have adequate examples on how to use the two modules.

-Wes

Jul 19 '05 #3
ncf
Ugh. Correction.

I can't begin to *act like* I know too much about this subject, ...

Jul 19 '05 #4
Thanks
I used the httplib module to establish and test a connection now the
next step is to login supplying a username and password.
Any examples of these available somewhere
This is what i have so far
import httplib, urllib
conn = httplib.HTTPConnection("xxx.xx.xx.xxx")
conn.request("GET", "/index.php")
response = conn.getresponse()
print response.status, response.reason
data = response.read()
conn.close()

Jul 19 '05 #5

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

Similar topics

13
by: Samantha Smit | last post by:
Hi, I am trying to create a simple asp page that has one command button that updates a database. The URL of the page is like this: http://MyServer.com/Update.asp?UserName=Tom My asp code is...
4
by: Tom | last post by:
I want to open a recordset object on an .asp page. When I open the recordset I would like to use a stored procedure that expects a parameter to be passed for the stored procedure. I will then use...
0
by: NETDeveloper | last post by:
Hi, I almost have my nested datagrid working properly. I created a datagrid on a user control and dropped that onto another datagrid. At first, I noticed when I was stepping through the code,...
18
by: Alan Z. Scharf | last post by:
1. I have a chain of six asynch callbacks initiated by a button, and want the page to refresh at the end of each callback to display A. Results of a SQLServer query showing cumulative running...
3
by: John Blair | last post by:
Hi, I have validators outside of a datagrid (for adding a new grid row) - however when i click "edit" column and then the "update" column of a grid row that has been edited - my other...
4
by: siaj | last post by:
Hello All, If some one has faced a similar issue.. My datagrid Update command is not getting fired in fact it seems that the no event fires on clicking the update link. Although the cancel and the...
4
by: DEWright_CA | last post by:
I need to be able to from C# launch a postback. I have a command button that launches a function, I also have a javascript function that then keeps you from firing any other objects on the page,...
2
by: TJ | last post by:
Hi All, I am having some trouble. I have created a database via the new database option inside VWD2005. Then and table or two. I have been able to perform INSERT and SELECT operations on...
3
by: Brad Baker | last post by:
I have a formview with a datasource that contains a select and update command. The select statement works fine but the update command doesn't seem to be working. After some troubleshooting I have...
1
by: imtmub | last post by:
Hi, I am new to asp.net. I have single page website that display the recordsin gridview from sql table. The table has 4 fields (wood, woodsize, price & woodtype). and i have added Boundcolumn for...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
1
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,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.