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
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
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
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
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
Consider this block of code:
form enctype=multipart/form-data action=... method=post
...
input type=file name=photo1 size=50
input type=file name=photo2 size=50
input type=file name=photo3 size=50
input type=file name=photo4 size=50
input type=file name=photo5 size=50
...
/form
In my PHP
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,
ill work:
session_name(hasLoggedIn);
$stuff = session_name();
session_start();
$HTTP_SESSION_VARS[username] = $username;
Regards, Michael
Phil Powell [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Will the following lines set up a ses
ion_name()}. that is why you have to call
session_name()
BEFORE calling
session_start();
Regards Michael
Phil Powell [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Thanx, however, I cannot retain the session_name when I go to the next
URL.
ion_name()}. that is why you have to call
session_name()
BEFORE calling
session_start();
Regards Michael
Phil Powell [EMAIL PROTECTED] schrieb im Newsbeitrag
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
Thanx, however, I cannot retain the session_name when I go to the next
URL.
ing line as the first
line of PHP script you execute on every page:
ob_start();
Check out http://www.php.net/ob_start for details on what that does.
--
Uchendu Nwachukwu
newsreply AT unndunn DOT com - www.unndunn.com
Phil Powell [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]"
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
?
// This function is the PHP version of the TCL proc PRODUCE_MENUBAR which
// will produce the menubar for all PHP files
//
// Syntax: echo PRODUCE_MENUBAR()
//
function PRODUCE_MENUBAR() {
global $HTTP_HOST;
$tcl = (preg_match(/\bdyndns\b/i, $HTTP_HOST)) ? tclsh83 : tclsh;
$path
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, 2002 at 08:01:46PM -0400, Phil Powe
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
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: Saturday, May 11, 2002 6:13 PM
Subject: Re: [PHP
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:
?
$willChangeLayout = 1; $isEmptyLayoutValues = 1;
foreach
);
// $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' [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, September 28
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 denied
_YOU_ don't need write permissions, the web server
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
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
code so the cookie is set before any output or use output buffering.
---John Holmes...
-Original Message-
From: Phil Powell [mailto:[EMAIL PROTECTED]]
Sent: Saturday, September 28, 2002 9:03 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: [PHP] Help! Can't set cookie or redirect!!!
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]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Saturday, September
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
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...
$start = time();
$timeout = 60; // number of seconds to try
while (!$file = fopen(...) time
- 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()
$startTime +
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 have the
rst time $nickname = phil
second time $nickname = philbob
HTH
David
On Saturday, December 28, 2002, at 02:24 PM, Phil Powell wrote:
Honestly, what does this do:
$fileID = fopen(nicknames.txt, a) or die(Could not open . $path
. /nicknames.txt);
chmod(nicknames.txt, 0755);
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 Warning.. why?
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
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
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 value is not
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
** 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 for help on this
one!
I have process.php that has to call a remote file called process.asp on
anot
if ($isValid) {
$cgi = '/cgi-bin';
if (strpos($HTTP_HOST, 'dyndns') === false) $cgi .= '/cgiwrap/ppowell';
$fileID =
fopen(http://$SERVER_NAME$cgi/pollinsert.cgi?pollID=$pollIDanswerID=$answerIDvalIdentifier=;
. urlencode($valIdentifier) . lastPollResultsID= .
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 =
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
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
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');
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
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
entified
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 am using the following header() functions to force
view.php to not cache:
header(Expires: Mon, 26 Jul
question with
filetime($filename);
that way you will be sure to get a unique argurment.
Jim
- Original Message -
From: [EMAIL PROTECTED]
To: Chris Shiflett [EMAIL PROTECTED]
Cc: Phil Powell [EMAIL PROTECTED]; [EMAIL PROTECTED];
[EMAIL PROTECTED]
Sent: Monday, January 20, 2003
- 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 script to call a TCL proc
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 would
I have various XML files that might contain tags inside the element body, for
example:
news id=1 shortDescription=Stuff Happened TodayToday on b1/29/03/b, stuff
happened/news
Because of this I can't use xml_parse_into_struct; when I do this happens:
array (
...
[attributes] = array (
$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 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
foreach ($profileArray[$i][attributes] as $key = $val) {
$singleProfileHTML .= $key . =\ . str_replace(', '#039;', str_replace('',
'quot;', $val)) . \\n;
}
The parsing error occurs in the $singleProfileHTML.. line. I'm completely don't get
it; I see absolutely nothing wrong with this,
;', stripslashes($val))) . \\n;
}
$singleProfileHTML .= --\n;
Beats the heck out of me!
Phil
- Original Message -
From: David Otton [EMAIL PROTECTED]
To: Phil Powell [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Friday, July 11, 2003 2:48 AM
Subject: Re: [PHP] What did I do wrong
$booleanNonFormVars = array('hasSelectedLetter', 'hasEnteredProfile',
'hasSelectedProfile',
'hasEditedProfile', 'hasDeletedProfile',
'willDeleteProfile',
'willDeletePic');
$booleanVars = array('profileID', 'showemail', 'showbirthday',
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
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):
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
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
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($fileID);
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.
Phil Powell [EMAIL PROTECTED] wrote in message
0ca201c2947e$44690a80$dcbe6444@scandi
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
information
58 matches
Mail list logo