Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    PHP




Auto Executing PHP Code


Right now i am on a matrimonial site. i wanna do an auto match finder. ie; there may be many registrations in the site. i wanna findout all those matched profiles on a daily basis, say by 12 midnight each day. i wanna get that list as a mail even if i didn't checked the admin screens. ie; the script should execute on 12 midnight each day automatically. is there any way. can i do it using PHP.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Command-line Php Displays Code Instead Of Executing Code
I am using CLI PHP to run a PHP script, c:wampphpphp.exe, but
instead of executing my script, it's actually displaying the raw code
instead.

How can I run my code using CLI PHP? I installed WAMP5 on WinXP.

Executing Code Within A Hyperlink
I am writing a photo gallery and suppose 8 photos are displayed. When the
user clicks on a button under the picture, I want it to add that picture
name to a "favorites" list within the session data, but NOT leave the page
the user is on. How could I do this?

Executing PHP Code At A Given Time
I was wondering how it would be possible to execute some PHP code every minute for example.. or every hour or on a given date.

Executing Php Code With JAVASCRIPT
i have this sample code:

<?php
<a href="linkurl" target="_self" onmouseover="<?php
echo '<a href="linkurl" target="_self">The link title</a>';
echo '<br>';
echo "Original text:";
echo '<br>';
echo "bla bla bla text in its original language";
?>">The link title</a>
?>

as you can see I am attempting to execute php code with javascript "onmouseover"
well the problem is the php code is always being executed, i need to make some kind of check statement to ensure that it will only be executed "onmouseover"

how would I do that? and is this possible to do this with php and javascript?

Returning Value While Still Executing Code
Anyone know of a way to return data to a browser and then continue processing code. For example in classic ASP they have:

<%
Response.write('THE BROWSER CAN SEE THIS');
// sending final response to the browser
Response.end;
// this will still execute even though the browser no longer is waiting for a response
my_function();
%>

I would like to immediately return a value to the browser and then run cleanup code without the browser having to wait. When I use the exit() or die() or return() functions in PHP it will end the code right at that point which is great because the browser gets a response back quickly but the remaining code never gets executed.

Executing Code Only If Certain Word Is Found
i have a php code that opens a text file and makes some changes to it. but i only want the code to execute if the following word is found somewhere in the file: "xq33XSDs"

Executing Code On Session Timeout
is it possible to execute some code on the session timeout event?
i.e. clear all db information and other stuff when the php session is
destroyed through the gc_maxlifetime timeout.


Auto Code Colouring
I am building a tutorial site and I was wondering what you had to do to a piece of text to make it automatically format the colour!

Eg. on this forum anything in the code/php BBtags the code is coloured for easy of editing and viewing!

Need Auto Save Code
Hi every oneI have to use auto save functionality just like gmail. If some already used such function then please send me code.

Code For Auto Response
i have a php file on a web site that send information to an email account for inquiry purposes. i need to add an auto response to the form. Code:

Auto-documenting Existing Code? (not Just PhpDoc)
I would like to auto-doc some existing code, mostly so I can
understand it. I am slowly adding PhpDoc comments, but I miss some
tools which I have for C/c++.

For instance, the Code Visual to Flowchart - automatic code flow chart
generator at http://www.fatesoft.com/s2f/ looks great - but costs $180.
Does anyone know of anything which will anaylze PHP code and
auto-generate flowcharts ... for free? (a lot to ask, I know)

Or, more simply, what about a function call-tree generator? There are
any number of these as GPL for C - does anyone know of such a thing for
PHP?

Or even just something to show which files incldue which others, in a
large project?

Is anything else which might help, which have not mentioned? Preferably
freeware.

Simple PHP Code--Auto Download Image
What PHP code would I need to simply download an image from an internet address and save it to a location on the server?  At regular intervals?  Can PHP somehow be added to the Windows task scheduler?  I have some security cameras that can FTP images to my server but when I have the FTP enabled and uploading images every 10 seconds, they become unstable and crash.  Viewing the image through the web browser doesn't seem to make them unstable.

How To Auto Prepend File To Show PHP Source Code
I know there is a auto_prepend option in php.ini. If I have a file like this: PHP Code:

PHP Not Executing, IIS 6
I'm attempting to run PHP on Microsoft IIS 6.0, and the PHP will
not execute.

For Example:

test.php:

<?
phpinfo();
?>

When I request http://localhost/test.php I get a blank page.
When I view the source, I get:

<?
phpinfo();
?>

Any ideas what I am doing wrong? Any resources that could guide me
through the install process? The .php extensions are setup correctly
(I believe) in IIS.

PHP Executing Twice
I am facing very strange problem When I submit any form using 'POST' method. my script executes twice. Is this a PHP bug or some thing else. I am using PHP4.3.1, MySQL 4.0.1, Apache2.x.x in Windows 2000 professional.

Executing MDL Programs Using PHP
Help to execute MDL Applications by making a call "mdl load <application name>" through PHP.

Executing An SSI Within A Php File.
I have the following line in an old shtml file:

<img src="http://www.domain.com/cgi-bin/logtrack/log.pl?ref=<!--#echo var="HTTP_REFERER"-->" width=1 height=1 border=0>

What this does is execute log.pl with the refererer to increment a logtracking program and find out what their referer is. How would I go about porting this to php?

Executing Scripts...
How do I execute one .php3 script from another. Passing one or two arguments, and then receiving the output? I have tried using the exec and passthru function, with no luck.

Executing Chunk Of SQL
I'm attempting to write an install script, I'm using the ADODB abstraction layer with my script, with that said here is my problem. I've got a large chunk of SQL that I need to execute through PHP, so I put it in a variable like so:

$db_sql = "
DROP TABLE IF EXISTS im_categories;
CREATE TABLE im_categories (
id tinyint(11) NOT NULL auto_increment,
name varchar(100) NOT NULL,
type varchar(100) NOT NULL,
template varchar(200) NOT NULL default 'default',
PRIMARY KEY (id)
) TYPE=MyISAM;";

Then I try to execute it using:

$result = $db->Execute($db_sql) or die(vpError() . $db->ErrorMsg());

I get the following error every single time and I have no idea what is causing it, the SQL data is from a phpMyAdmin export by the way. PHP Code:

Ajax Not Executing Php
When a user clicks a link I have it open up a file in a div using ajax.

my code is

<a href="#Find" onclick="javascript:jah('Find.html','content');">Find</a><br
/>

Where Find.html is an html file on the server. Now when I do this everything
works fine except php code is not being executed.

The jah code is

function jah(url,target) {
// native XMLHttpRequest object
document.getElementById(target).innerHTML = 'sending...'
if (window.XMLHttpRequest) {
req = new XMLHttpRequest();
req.onreadystatechange = function() {jahDone(target);};
req.open("GET", url, true);
req.send(null);
// IE/Windows ActiveX version
} else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.onreadystatechange = function() {jahDone(target);};
req.open("GET", url, true);
req.send();
}
}
}
function jahDone(target) {
// only if req is "loaded"
if (req.readyState == 4) {
// only if "OK"
if (req.status == 200) {
results = req.responseText;
document.getElementById(target).innerHTML = results;
} else {
document.getElementById(target).innerHTML="jah error:
" +
req.statusText;
}
}
}

Executing Applicaitons
is there any way to execute desktop applications under a web interface using php? I need to get a non-finite amount of users to be able to execute a learning course program and use it remotely using a web interface.

Executing A .bat File With PHP
I have a .bat file that copies certain files across a network and I needed a way to run this file using PHP.  I was looking at exec() but I was not sure exactly how to use it.  I was also using pstools but could not get them to work with PHP.  Can someone give me an example of how to do this or send me somewhere where I can read up on this?

Executing .sql File
how may I execute .sql file using php?

Executing A Variable?
If a variable stores a function, could I execute the function by typing the variable alone? Or maybe by echoing it?

<?php

/* Set variable */
$math = round(23.89);

/* Execute variable? */
$math;

/* Echo variable? */
echo $math;

?>

Executing A Program
I am trying to run a console application which needs to keep running even after the php script has finished executing. I also need the PID or some sort of handle I can use to kill the program at a later stage.

Executing Cgi Scripts Within A PHP Document
Is there a way to execute a CGI script using an include like I do with the SSI includes. I want to just execute my weather cgi file like I do on my page at www.insidemath.com .... whoever can help please do so.

Executing A Shell Command
I try to use the backtick "`" to exacute a shell command from a PHP script. However, `touch file`; doesn't make the file. Neather does exec(), system(), etc. They all work when is used a different command, such as pwd, or ls. So what's a brotha gotta do to creat a file?

Executing Function At A Later Time
I'm making a game sort of thing in PHP and I was wondering if there was a way in PHP that I can pause the execution of a function after x seconds. I don't want the whole script to stop working though, so for example

// function 1

(pauses for 10 seconds) {
// function 2
}

// function 3

i want the script to execute like normal, but pause for 10 seconds before executing function 2, so it would execute function 1 and function 3 then 10 seconds later, execute function 2

this is exactly like the fork() statement found in MOO programming

go here to get a clearer definition.
ftp://ftp.research.att.com/dist/eostrom/MOO/html/ProgrammersManual_37.html#SEC37

is there a way to do this in PHP?

Executing Php From With A Perl Script
I know perl and can write the script. What I want to do is to be able to
grab a page, pass it to php if it has the php extension, get the
results(html) and then send it to the browser. Is it possible?

I saw this bit of code on a server that seems to execute php. Don't know
what it means, but it gave me the idea.

Executing Programs On A Server
i've written a c++ program that converts one file type to another via
two arguments (the input and output filenames).

i want to execute this on my server, using something like

exec("myprogram.exe $arg1 $arg2");

but then I realized my server is linux, and my program was compiled for
windows.

so I uploaded the .cpp instead, and now i'm trying to compile it doing
something like

exec("gccp hello.cpp");

which returns an exit code 127... not really sure what that means.

I'm guessing I probably don't have permission to be creating files on
my server...is there anyway I can change this permissions or anything?

How Can I Do Cron Job For Executing My PHP File
How can i do cron job for executing my PHP script once in every day. i want to remind the people about their birthday in reminder.php. that would be one week before thier birthday and one day before their birthday. can i perform this action with cron job?

Executing External Programs
I know all the different functions that allow me to execute an external progam, however I have come across and interesting problem that I need to fix if it is at all possible.

Is there a way that I can use the php functions and execute an external program by some other user other then who ever owns the apache process?

Executing Php Blocks In A String
From the examples I've seen, I don't think eval() works for this, or
if it does, I'm not sure how. Here's the setup. I'm storing web page
content in a database. 95% of the time, all the php takes outside of
the content area, setting up menus and footers, that sort of thing.
But some web pages have php code in the middle.

So I'll have a variable, $content, that looks like this:

$content = "<p>I'm content</p>

<?php print "hello world
"; ?>
<p>More content</p>";

How can I get php to execute the code inside the code blocks in the
variable?

Executing Linux Commands W/PHP
I was just wondering if anyone knew how to properly execute a Linux command in a PHP script? I have been trying this: PHP Code:

Executing A PHP Page Without Using The Webserver
We have a job in a PHP page on a Unix server which we have to start in two ways: Via Apache, that's easy and periodically in an automagic way. To execute the page periodically I need a cronjob for it. Has anyone any experience with executing a PHP script using cron?

Executing A Dump.sql File With Php
Is there an easy way to execute a mysql dump located in the same directory as the php file on unix?

Storing/Retrieving/Executing Php
I want to creating an application where all my php(with html) is stored in the database.
So my index.php would find the appropriate the php file associated with the index page. It should execute this new code
as part of the original index.php. Can you please let me know if it is doable?

Executing PHP Program In Console???
I am beginner to PHP.
I read that you can run PHP program in a console window.
How can I do that?

Executing Pkzip On Windows 2K
I have pkzip in my PATH (c:winntsystem32.exe) Now, when I open the windows command prompt and type: Code:

C:phpdevwwwwebsite> pkzip zippedfile.zip filetozip.jpg it works and creates the 'zippedfile.zip' for me.

When I execute it in PHP however: Code:

echo `pkzip zippedfile.zip filetozip.jpg`; nothing happens, no file is created and no output is echo'ed.

Strange thing though: Code: echo `dir`; it outputs the working directory file listing (directory the php script is in) safe mode is off... Am I missing anything?

Executing A Program Remotely With PHP
I need to be able to make the user be able to click a button, which then launches a batch file on my computer.. But passthru() doesnt do the job anymore. And is faulty.. My computer is the server, so it'd also be nice if the command could launch it in a windowed form instead of a background process Here's my code:

Loading Graphic While Executing
I was wondering if there was a way to display a loading graphic until a PHP script has finished executing.

Executing A Function In A Form
I have a form that, when no errors are present, is set to perform two functions. One is to insert the data into a database and the other is to email the results. Right now neither are happening even though I do not get an error message. The functions are contained in an 'include' file. Here's the code i'm using to execute the form parsing: Code:

Executing Command Lines...
I'm trying to execute a command line through ffmpeg.exe in php. Can anyone tell me how this is done.

Also where should I have such an application installed relative to the root of the site?

Goto Homepage After Executing A Script
Probably a very easy question but I am stumped. I have written one of those tell a friend scripts where you enter your friend's email address and the script sends out an email to the friend's email. The problem is that I want the user to be directed to my homepage after the script that generates the email is executed. Is there a function or something in PHP to do this. Sort of like a goto or redirect function if there is such a thing. Due to reasons I wont go into here the homepage is not and cannot be in PHP. The homepage is just a static html page.

Alternatively, do I just use the action= on my form page ie:

<form method="POST" action= "www.homepage.com" and "sendurl.php">

I tried the above but it does not seem to work for some reason the URL appears on the browser address bar but I end up in an invalid page. It is only when I hit refresh that that the page comes up

If I have confused everyone by what I want to do, all I really want to do the same thing as what this bullitin board does when you submitt a new thread ie: goto thank you page and then a back to homepage or any other page.

Executing A File When A Button Is Clicked
I was wondering if someone could help me. I want to execute a .reg file when the user clicks a certain button. does anybody know how to do this. i already have the file created but i don't know the code to execute it if button clicked.

Parse Error When Executing A DB Query
I am attempting to display the results of a MySql db table to a browser. Its obviously very simple, but I keep getting a parse error on this line...

echo("<p>" . $row["QuoteText"] . "</p>"); PHP Code:

Executing Functions Inside Ereg_replace.
i have tags like: {content:hello} in my string. I want the function to take the 'hello' part and do something with it. I even wrote regexp(i hate them!!)

Executing A Procedure From The Cammand Line
I have a SQL command procedure, myproc.sql, containing sql statements. After
I login to MySQL, how do I execute this procedure?

Problem With Executing A Command From Within My Script
I'm working on a web-based mail quarantine management system, and am
running into some problems getting it to run the command to release a
message.

The main exertp of the script is below:

<?php

echo "Releasing /var/amavis/quarantine/" . $_POST['release'] . " to
user " . $_POST['user'] . "<br><br>";
$command = "/usr/sbin/amavisd-release " . $_POST['release'] . " " .
$_POST['secretid'];
echo $command . "<br>";
passthru($command, $return_val);
echo "<br>" . $return_val;
?>

End script

This command works fine from the command line, but won't run using this
code. It comes back with a return code of 13 each time. I've also
tried the exec and popen functions in place of passthru() with no luck.
If it matters any, amavisd-release is an executable Perl script.


Copyright © 2005-08 www.BigResource.com, All rights reserved