How Can I Automate PHP Tasks?
I am currently running the same task multiple times a day and I'm sure there is a way to automate it. It is a simple one, but with limited PHP knowledge I'm not sure of the best way to do this. Here's what I need to do
1) log-in to a 3rd party site
2) Download the CSV
3) Upload to my db
View Complete Forum Thread with Replies
Related Forum Messages:
Automate Invoicing
Is a "cron job" the only way that I can send email invoices from a mysql database on the 1st and the 15th? And if it is where do I look for information on how to do a "cron job"? I know how to get the data from the db and put into and send the email. I just want to find out how to automate the sending.
View Replies !
Automate An Insert Command
i am trying to automate an Insert command but i need to limit it to a number stored on an array "insert into staff_stud_alloc SELECT top_stud.stud_id, top_stud.staff_id, top_stud.top_id from top_stud, topic, student, staff, top_staff where student.stud_id = top_stud.stud_id and...... level = 'a' and top_pref = Ƈ' limit '$row2[$j]'"; if i use normal variables like 1,2 it works....but does not work on that..
View Replies !
Automate Data Import
I'm trying to automate transfering data from a non-SQL database to MySQL. The text file containing the data has the following format: TRUNCATE TABLE 'products' INSERT INTO 'products' VALUES (1,2,'Some Product',9.95); Using phpMyAdmin 2.6.0, the "Choose File" works nicely every time to import 7600 data records into MySQL 3.23.56. But file_get_contents() in a PHP script produces "SQL systax errors" with the same text file. Can someone suggest a PHP / SQL approach that will import cleanly?
View Replies !
PHP Tasks
some times i get this error on my script: Internal Server Error i researched very much on why this error happens and i get to: i forgot to close some php tasks in my script. now i know only mysql_close() for closing one of php tasks. what are others php tasks that need to closing?
View Replies !
Looking For Way To Automate PDF Index (or Menu) Generation
I'm looking to create a PHP script that will automatically generate an index/menu/list (whatever) based on the PDF files that are within a particular directory. I would like the script to be able to parse out the title, description, author(s), and date from the documents, and use that information to create the index.
View Replies !
Automate Searches On A Web Site Which Uses A Php Script
I am trying to automate searches on a web site which uses a php script. After examining the HTML form, I assumed I could assemble a querystring and submit something like http://mysite.com/myscript.php?name...e1&name2=value2 however I receive basically a blank page back. There is nothing other than the address for the php script in the address bar of the browser. I am a novice programmer, and have no background in php. was hoping someone could steer me in the direction of some useful resources/examples.
View Replies !
Automate Checking File Verification
I'm trying to simplify my life. Right now I have and index page. In the index page I have $pass variable. In that variable is an array of names. Thanks to Kami in a previous post, the method below checks to see if a the url variable id is equal to one of the $pass names if so its loads its value to $page. What I would like to do is automate the $pass array. that list is actually a list of file names in a directory but with the file ext removed. So far I can't find any information on what I would like to achieve on the board. Code:
View Replies !
Cron Tasks
I'm building an auction site which needs scripts automatically launched to scan the closing auctions. I'll use Linux's crontab. I'd prefer to avoid installing Php as a cgi and prefer to keep my apache module config. I'd also prefer to avoid the use of a browser as lynx to do this job because I fear the time-out How I can launch my scripts?
View Replies !
Background Tasks
I'm using some weather rss feeds in a web site. The feeds are updated once every hour and cached in a local file. My problem is that every time the weather report is updating I get a long wait (not that long.. 2 or 3 secs) before the page is displayed. This happens becauses the teplate engine that parses the page is waiting for the weather section to be parsed and cached. Is there a ay I can start the weather parsing as a background thread and return immediatly to the template engine to continue to parse the page? And if so How?
View Replies !
Automated Tasks
I have an auction site running. Now I want the auction to be able to automatically send a mail msg to the seller after it expires. How do I do it? Obviously there is some sort of way that I can employ so that this task does not require an operator (such as me) to run manually. This task will involve accessing the database and sending an email. Can somebody enlighten me on this?
View Replies !
Directory Tasks
Im looking to do some work with directories. Basically, there are some directories which I want my website users to access fully, and see all the files in there. My server allows index of directories automatically, where users can see all the files in the directory (unless there is an index page). Code:
View Replies !
Making A Php Web Browser To Automate Downloading Files
I am trying to automate the following process in php Our client does the following: They go to a website and enter a password and user name to a form, that posts the info to log them in, they can then click on a couple of links to download a couple of text files. I would like to build a php script that could fake the post and then wget (or something similar) the text files. Does any one have an scripts to do this. I don't know that much about headers but I am sure it is possible. i have found some code snippets but none do what I want.
View Replies !
Automate Access To Password Protected Sites
we're fully paid up and signed up to a password protected site, so this isn't hacking. In this site we can download a price list in CSV format. What I'd like to do is have a PHP script log into the site and download the CSV file so we can then display it on our website.
View Replies !
Using PHP For Nightly Backend Tasks?
I have to develop a script to be run nightly to go through a database and send emails based on conditions. It's a large database, and there are several thousands of emails to be sent during the week everyday. The script will be run with a cron job at midnight or so. I was wondering if PHP is suitable for this, or may it be problematic, for instance would its execution abort after a certain amount of time? Or is it perfectly fine for this task?
View Replies !
How To Schedule Tasks On Website.
I am trying to figure out how to schedule tasks on my website. For example, PAGE1 should perform a different task in the morning than in the afternoon. And at the end of the day, I have to extract some data from the database and put them into a file. This should be done automatically.
View Replies !
Script In Windows Tasks
I would like to know how do i work with php in windows tasks. i developed a php web application and i would like to recieve to my email every day a certain report which will be produced by a php script.
View Replies !
Cron/scheduled Tasks
Im running my site on a web server, and want to add something so that every hour the variable $gold = $gold*($workers*3.1) +($banks*30); and the way to do this is cron jobs from what ive gathered from searching google. BUT not only haven't i found a good tutorial, but I haven't found a single example taht isn't with CGI or a download.
View Replies !
Automate Openssl S_client Command In Batch Or PHP Script
I want to retrieve the details of an SSL certificate of HTTPS websites, using openSSL, running on Windows 2003. This works fine as follows: openssl s_client www.somewebsite.com:443 > cert.txt In order to close the openSSL connection to the HTTPS website, I have to manually type "quit" + enter. Now I want to use this line in a PHP script (running on Windows 2003 with IIS6), so I do not have the possibility to type "quit" + enter. If I use following code, the PHP script will hang: shell_exec("openssl s_client www.somewebsite.com:443 > cert.txt") Is there a possibility to automate openSSL s_client, so it can be used from a script or batch ? I have tried to invoke the above openSSL command from VBS, and use sendkeys("quit{enter}"). This works fine if ran from a DOS window, but not if the VBS script in turn is invoked by a PHP webpage. In this case, the PHP page will wait for the VBS script to end, and because the VBS script is invoked from a PHP webpage and not in a DOS window, the sendkeys function doesn't work. So PHP will wait infinitely and hang. Can openSSL s_client be automated, or can one of the PHP functions shell_exec, or exec or popen be used without the script hanging infinitely?
View Replies !
PHP/mySQL Running Tasks Automatically?
I have a MySQL DB with all my client details (name, email address etc). I want to use PHP to retrieve records from the DB and email each of these clients (easy enough) BUT I want the system to automatically do this at pre-defined times. I have thought about using the UNIX/Linux CRON utility to perhaps call a PHP script that would retrieve specific records (based on a timestamp perhaps?) and then have it email based upon those records. Does this sound feasible? Are there better ways to do this?
View Replies !
Cron Jobs / Tabs / Tasks And More
I'm building a site with a mySQL db behind it. There are going to be a lot of records in it with products. Now i have recently discovered cron jobs, and i thought it would be a good idea to use those to backup the database. i have a few questions: - If i back up the database, does it put the backup in an actual different db, or just in the same db but other tables? (Silly question maybe, but i'm new to this) - Can the DB still be queried bij site-visitors though it's being backed up? - Is it possible to just backup new/updated records instead of the entire db? - Imagine i backup once a month. can the cron job notice if the DB is dameged/ has errors, so it'll stop backing up so it doesn't overwrite the previous backup... or doesn't backup delete the previous backup?
View Replies !
Executing PHP Tasks While Letting A User Continue To Browse?
I was wondering if someone could help me out with the following two situations. In a lot of my web apps, it seems that if i launch a PHP script that takes a long time to complete, the user is unable to browse/use the rest of the website until the tasks completes. Is there a way to avoid this? Specifically, app #1 let's a user choose which files to include in a zip file, then PHP makes the .zip file on the server and streams it to the user via fopen/fread. So, as the user is downloading a file on the side (it presents them with the open/save dialog) they are unable to browse the rest of the PHP-based site until the download completes; clicking on any links to pages does nothing, the browser just sits there until the file has been downloaded, THEN the screen advances. I am experiencing a similar thing with a PHP mail delivery system. I tried to create a work-around: a pop-up window that sends an 'exec' command to the a php-script that sends the email to a few hundred recipients. Again, even though this action is being done in a pop-up window (and via the command line, no less), the user is paralyzed in the main window until the action completes.
View Replies !
Sending Mails Without Using Scheduled Tasks (crone Jobs)
Can we set up a mail program that the mail can sent frequently..ie may be daily or weekly or monthly... with out using scheduled tasks or crone jobs. for eg .. can we create a page that works like the scheduled tasks page( there we can set up the time at which time the program will execute )..that means we have options in our webpage to set up the time at which the mail will sent. for eg..every monday.. can we set up this in the program without using scheduled tasks or crone jobs. can we run our page frequently without using crone jobs .
View Replies !
|