I have concluded that Bill Gates is Satan!
Ok, I'm late, but... I have had 26 scheduled tasks that run every hour on the hour
every day for eternity to go and run a series of Java files I wrote that connect
remotely to a remote server to do remote cleanup of stray XML files, etc.; things I
cann
$booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile',
'hasSelectedProfile',
'hasEditedProfile', 'hasDeletedProfile',
'willDeleteProfile',
'willDeletePic');
$booleanVars = array('profileID', 'showemail', 'showbirthday', 'se
Thanx I got it to work, however, I have no idea why it works now considering
I did nothing different:
$singleProfileHTML .= "\n";
Beats the heck out of me!
Phil
- Original Message -
From: "David Otton" <[EMAIL PROTECTED]>
To: "Phil Powell" <[
foreach ($profileArray[$i][attributes] as $key => $val) {
$singleProfileHTML .= $key . "=\"" . str_replace("'", ''', str_replace('"',
'"', $val)) . "\"\n";
}
The parsing error occurs in the "$singleProfileHTML.." line. I'm completely don't get
it; I see absolutely nothing wrong with th
$stuffArray[$i][value] = strtr($stuffArray[$i][value],
array_flip(get_html_translation_table(HTML_ENTITIES)));
To be bluntly honest, I don't understand hardly any of it, and the PHP Manual isn't
helping this time.. maybe I'm weekend-stupid or something.. *sigh*
Phil
I have various XML files that might contain <> tags inside the element body, for
example:
Today on 1/29/03, stuff
happened
Because of this I can't use xml_parse_into_struct; when I do this happens:
array (
...
[attributes] => array (
[ID] = "1"
If I have a text of string like this:
$stuff = "Hi my name is Phil, my email is [EMAIL PROTECTED] and you can find me at
http://www.xx.yy?[EMAIL PROTECTED]";;
What I want to do is to "validate" all patterns resembling an email address EXCEPT
those found within the query string of a URL. I woul
- Original Message -
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 21, 2003 5:36 PM
Subject: I need my PHP script to call a TCL proc
> From: [EMAIL PROTECTED] (Phil Powell)
> Newsgroups: comp.lang.tcl,comp.lang.php
> Subject: I need my PHP
add the modification time of the file in question with
> >
> > filetime($filename);
> >
> > that way you will be sure to get a unique argurment.
> >
> > Jim
> >
> > - Original Message -
> > From: <[EMAIL PROTECTED]>
> > T
owser will more than likely not have the image file identified
> by the random number it must request it again from the server. Works
> great where I need it!
>
> Ed
>
> On Mon, 20 Jan 2003, Chris Shiflett wrote:
>
> > --- Phil Powell <[EMAIL PROTECTED]> wrote:
> &
I'm having a day, gang!
I have done nothing to my code and now is_uploaded_file is constantly false, even when
uploading a file every time. I dunno what to do, would someone want to look at my
code and tell me what I did wrong; I'm out of ideas.
Phil
I am using the following header() functions to force view.php to not cache:
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");// Date in the past
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
// always modified
header("Cache
Consider this:
I have display.php, a script that will do XML parsing into an array and display its
contents.
I have view.php, a script that will include display.php and have to manipulate the
variables within display.php for itself.
So in view.php I have:
require('/.../.../display.php');
How
Following is the code that will do a remote scrape of
http://www3.brinkster.com/soa/val/profile/display.asp (which sometimes goes down),
however, it should time out and produce an error after 5 seconds; instead, sometimes,
the entire page (http://valsignalandet.com) which includes this script be
I have a question about the usage of fsockopen() to open and "scrape" the contents of
a remote URL: if the contents take a very long time to load on the remote URL either
due to server or coding issues, is there a way for the socket on the PHP end to time
out, that is, quit trying to "scrape" co
> Anyone know why this is happening? I have mySQL on Win2000 Server with IIS
> and PHP:
>
> mysql_num_rows(): supplied argument is not a valid MySQL result resource
>
> Here is my code:
>
>$conn = mysql_connect('localhost', "xxx", "yyy") or die('Could not
connect
> to db');
> $result = mysql_
if ($isValid) {
$cgi = '/cgi-bin';
if (strpos($HTTP_HOST, 'dyndns') === false) $cgi .= '/cgiwrap/ppowell';
$fileID =
fopen("http://$SERVER_NAME$cgi/pollinsert.cgi?pollID=$pollID&answerID=$answerID&valIdentifier=";
. urlencode($valIdentifier) . "&lastPollResultsID=" .
($pollResultsArr
call it like a web
page using curl?
>
>
>
>
> *** REPLY SEPARATOR ***
>
> On 04/01/2003 at 6:43 PM Phil Powell wrote:
>
> >I don't know how to post this one so I'm sorry for such bizarre
> >cross-posting, but honestly I don't know where to go
I couldn't think of isset, so I winged it:
if (strlen($var) > 0) {...}
Phil
"Michael Sims" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Sat, 4 Jan 2003 19:26:02 -0500, you wrote:
>Whenever the form variable is equal to 0, the value is not passed into the
foreach ($HTTP_GET_VARS as $key => $val) {
if (!empty($HTTP_GET_VARS["$key"])) ${"$key"} = $HTTP_GET_VARS["$key"];
}
foreach ($HTTP_POST_VARS as $key => $val) {
if (!empty($HTTP_POST_VARS["$key"])) ${"$key"} = $HTTP_POST_VARS["$key"];
}
Whenever the form variable is equal to 0, the va
I don't know how to post this one so I'm sorry for such bizarre cross-posting, but
honestly I don't know where to go for help on this one!
I have process.php that has to call a remote file called process.asp on another site.
Site 1 has the cookie domain I want (that's where process.php is housed
I have $REQUEST_URI that will take two values:
"/event/login.php"
and
"/event/register.php"
What I need to do is so simple it's brainless!!! I need to look into $REQUEST_URI and
find if it contains "register.php". I tried this and it completely failed, the
results were wrong every time:
if
Ok, I am a bad coder. :( I can't figure this out at all:
$fileID = fopen("nicknames.txt", 'r');
$stuff = fread($fileID, filesize("nicknames.txt")); fclose($fileID);
if (strlen($stuff) > 0) $priorNickNewLine = "\n";
$nicks = explode("\n", $stuff);
The last line produces the Warnin
sking it to do. Have you checked the
> value of $nickname to see if you are setting it to "bob" or appending
> "bob" to it?
> i.e first time $nickname = "phil"
> second time $nickname = "philbob"
>
> HTH
>
> David
> On
Honestly, what does this do:
$fileID = fopen("nicknames.txt", "a") or die("Could not open " . $path .
"/nicknames.txt");
chmod("nicknames.txt", 0755);
fputs($fileID, $nickname . "\n"); fflush($fileID); fclose($fileID);
What does it EXACTLY do? What I'm trying to do is very very simple: I
- Original Message -
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 13, 2002 5:13 PM
Subject: PHP script needs to timeout upon FOPEN to URL
I have the following line:
while (!($file = @fopen("http://www.myurl.com";, "r")) && time() <
$start
From: "Tim Ward" <[EMAIL PROTECTED]>
To: "Phil Powell" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Sent: Sunday, December 08, 2002 3:10 PM
Subject: Re: [PHP] fopen have a "setTimeout" feature?
> how about something like...
Can you set something like a "setTimeout" feature in fopen? That is, if you use fopen
to open a URL for "scraping", if that URL's server is down or doesn't respond in x
seconds, can you set a feature to show an error message or a "friendly" error message
indicating such?
Thanx
Phil
I am using this line:
if (!mail($to, $subject, $body, "From: " . $from . ";" . header("Content-type " .
$contentType))) {..}
to use the mail() function in PHP to send simple text/plain or text/html email.
However, upon attempting to send I get a warning message indicating that header
informat
ist. It works for me to do "r" in all
other folders with the same permissions as /chat.
Phil
"Craig" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> you must give the same permissions to the folder also.
>
>
> "P
Hi I have the following code that breaks:
// PLACE NICK INTO NICKNAMES.TXT AND START OFF MESSAGES.TXT
$fileID = fopen($path . "/nicknames.txt", "a") or die("Could not open " . $path .
"/nicknames.txt");
chmod($path . "/nicknames.txt", 0755);
fputs($fileID, $nickname . "\n"); fflush($file
Is it possible, w/o using sessionid session variables, to use setcookie to set a
cookie that will have two domains or more?
Just curious. I am having to set a cookie that will go to one domain and then to
another domain. Not sure if I can do multiple setcookie commands and be able to
produce
I have a directory $DOCUMENT_ROOT/my/images, permission 0755
I have three images in my folder with the exact same permissions: 0755; same
ownership, same everything.
The files, viewed on my machine, are fine too.
However, two cannot be seen due to permissions errors; one can be seen. All thre
If you go to http://valsignalandet.com/feedback.php you can get a clearer indication
of what I am trying to get rid of. Following is my function using to produce the
stuff up there, which I don't want, instead, I either want cookie-driven information
or nothing (if no cookie is set):
function
I have the following URL:
http://valsignalandet.com/cgi-bin/cgiwrap/ppowell/php4.cgi/~ppowell/my/style.php
This is a PHP script that is evaluated and compiled by a CGI script, php4.cgi, to
allow for file and directory manipulation w/o having to change file and directory
permissions to world-wr
Never mind, I found it.. *sigh* I forgot about phpinfo()..
Everything works now, cookies, redirection, everything.. thanx!
Phil
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Phil Powell'" <[EMAIL PROTECTED]>; <
ORDER);
preg_replace("end($idArray[0])", "", $stuff);
$layoutID = fopen("$path/layout.txt", w) or die("Could not open file:
$path/layout.txt");
fwrite($layoutID, $stuff); fflush($layoutID); fclose($layoutID);
// DELETE COOKIE
setcookie(&qu
I am getting the following errors attempting to set a cookie and redirect:
Warning: Cannot add header information - headers already sent by (output started at
/users/ppowell/web/my/process.php:5) in /users/ppowell/web/my/process.php on line 76
Warning: Cannot add header information - headers al
The following produced a rather nasty parse error:
echo ($idArray[0][sizeof($idArray[0])]));
I have a 2-dimensional array $idArray that I must obtain the LAST element of that
2-dimensional array.. how do I do it?
Thanx
Phil
mkdir
and uploading!!
Phil
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Phil Powell'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Saturday, September 28, 2002 7:04 PM
Subject: RE: [PHP] mkdir() failed: Permission de
01755);
// $path = "/users/ppowell/web/my/images/";
Warning: Unable to access /users/ppowell/web/my/images/ in
/users/ppowell/web/my/process.php on line 27
Phil
- Original Message -
From: "John W. Holmes" <[EMAIL PROTECTED]>
To: "'Phil Powell'" <
Ok, I am stuck. I am trying to create a folder in the same directory as
process.php and then use move_uploaded_file($FILES['myImage]['tmp_name'])
and it constantly fails:
mkdir() failed (Permission denied)
Here is my code:
$val) {
if (strcmp($key, "isDefaultLayout") == 0) $willChangeLayout
I am intrested in creating a chatroom entirely in PHP involving streaming text. Where
can someone help me to find such a means of doing so?
Thanx
Phil
http://valsignalandet.com
Swell, I found the error, and it was a STUPID one.. I misconfigured fread()!
Thanx though
Phil
TCL 1, PHP 2
- Original Message -
From: "Lars Torben Wilson" <[EMAIL PROTECTED]>
To: "Phil Powell" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Satu
TCL 1, PHP 0
Ok, I am frustrated.. here is my code and this portion has to be done in
PHP. I have a frame that can only be accessed if 1 of 2 things occur:
1) if $HTTP_REFERER has a specific value
2) if your nickname passed in the query string is found in the existing
nicknames.txt file found i
Found a MUCH MUCH simpler solution that works across the board.. change
$HTTP_HOST to $DOCUMENT_ROOT and it works!
Phil
"Analysis & Solutions" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Phil:
>
> On Fri, May 10,
http://$HTTP_HOST/$path/menubar.cgi";, "r");
$menubar = fread($fileID, 100);
fclose($fileID);
return $menubar;
}
?>
This function exists in the file "menubar_functions.php" which is in the
docroot. I have a PHP script in a subfolder /chat that produces a Fatal
Error (call to undefine
I had thought that a session would last only 20 mins if
session.gc_maxlifetime is set at 1440. Was I wrong in assuming this? I
have pages that have session_start() at the top to persist the session
throughout the life-cycle of these pages, however, I want the session to
expire after 20 mins or s
gt; Make sure you aren't sending any HTML to the browser for any reason before
> the session_start(); call.
>
> Surefire way to prevent this error: place the following line as the first
> line of PHP script you execute on every page:
>
> ob_start();
>
> Check out http:/
ssion_name first sets the name. then you call session_start which will
> look for the
> sessionid in ${session_name()}. that is why you have to call
session_name()
> BEFORE calling
> session_start();
>
> Regards Michael
>
>
> "Phil Powell" <[EMAIL PROTECTED]> s
ssion_name first sets the name. then you call session_start which will
> look for the
> sessionid in ${session_name()}. that is why you have to call
session_name()
> BEFORE calling
> session_start();
>
> Regards Michael
>
>
> "Phil Powell" <[EMAIL PROTECT
S["username"] = $username;
>
> so perhaps this will work:
>
> session_name("hasLoggedIn");
> $stuff = session_name();
> session_start();
> $HTTP_SESSION_VARS["username"] = $username;
>
> Regards, Michael
>
> "Phil Powell"
Will the following lines set up a session by the name of "hasLoggedIn" with
HTTP_SESSION_VARS["username"]?
$stuff = session_name("hasLoggedIn");
$HTTP_SESSION_VARS["username"] = $username;
session_start();
I am trying to create a page that sets a session variable upon successful
login,
Consider this block of code:
...
...
In my PHP script, I have the following:
for ($i = 1; $i <= 5; $i++) {
if (is_uploaded_file($HTTP_POST_FILES['userfile'][$i]['tmp_name'])) {
$hasNoPics = false;
move_uploaded_file($HTTP_POST_FILES['userfile'][$i]['tmp_name'],
"$DOCU
I understand the concept of session variables, so I want to know the best
methodology of approaching this:
1) HTML redirect to PHP page
2) PHP page looks for session
a) If found, show some stuff
b) If not found, prompt user for username and password
3) If no session, prompt user for username
I am having to do a remote URL screen scrape using PHP in "safe-mode". What
do you recommend I do?
Thanx
Phil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Anyone out there ever work with .phtml files?? Especially in trying to
include CGI scripts into .phtml files?
Need some help here if possible
Thanx
Phil
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
The server is UNIX-based server for Linux running PHP in safe mode.
I have a CGI script I wrote in TCL, menubar.cgi, that I have to include into
a PHP file on the docroot, feedback.phtml. How do I include the CGI script
and display the evaluated contents (again, it's in TCL, not PHP not even in
58 matches
Mail list logo