Kirsten wrote:
I need to reduce the size of the HTM generated by a PHP script for faster
transmission. I'm actually using ob_start("ob_gzhandler") but I also need
some function to reduce the size of javascript blocks, deletion of
unnecesary blanks, etc.
For example, Code A:
Re: [PHP] Reducing size of htm output
Kirsten wrote:
preg_replace('/s+/', ' ', $html);
but watch out, this js code will work:
var v
alert(v)
this one will not:
var v alert(v)
Sure
but now: how do I access the htm output of the current executing script
before it is send to the user?
output buffering
--
PHP General Mailing List (htt
Ryan A wrote:
Hey,
I have been screwing around with this code for around a day and am hitting a
wall, any
help would be appreciated.
Basically, I am working on a site that queries the DB for companies and the
plans the company
is offering, the DB is quite big (a few thousand records in each of the
First of all, don't hijack threads. Instead of replying to a message,
create a new one.
SED wrote:
I need to POST long texts through a form to PHP but the text cuts down to
around 64.000 characters. Is there any way to allow longer texts (like in
php.ini)?
This is browser limit. Most, if not all,
George Pitcher wrote:
Hi guys,
I'm doing something dumb but I can't see it.
The basic premise is:
sql search of orders sorted by customer
set g_customer_id to ''
loop through resultset
if customer_id not same as last record's customer_id (g_customer_id)
get customer email details
set up m
Murray @ PlanetThoughtful wrote:
Hi All,
I need to implement the ability to ftp upload files from client machines via
a form in a web application I'm developing.
From reading the PHP help, all I can find to perform this is the POST method
for handling file uploads
(http://au2.php.net/manual/e
Cole Ashcraft wrote:
Hi.
I need to know what PHP version had API # 20001222.
Thanks,
Cole
4.0.5
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Martín Marqués wrote:
I have a text variable that contains "$" symbols, that when I pass it out PHP
thinks that the "$" mean that a variable name comes right after.
I tried escaping the "$" put with no luck.
Is there something I can do?
How did you escape the symbol? You should use backslash: \
Ross wrote:
Is it possible to send variables using header() ?
I have tried variations on the theme
header ('Location: email_confirm.php?email=$email);
but nothing seems to work.
I don't know what you tried, but the above results in parse error. Try:
header ("Location: email_confirm.php?email=$email
Merlin wrote:
Hi there,
I am wondering if there is a function (I could not find) which does the
same thing like strpos does, but with an array.
For example:
$replace = array("picture", "pics");
$pos = strpos ($term, $replace);
if ($pos !== false) {
$term = str_replace($replace,
Sam Smith wrote:
I have an existing PDF file that I want to add text to or make changes to
text with data from an HTML form via PHP.
The PDF looks like this:
20 0 obj<>stream
8;X-DgMYb:(An746bc%oU,Mo*S]"SN?epNo...
That is, not in plain text.
If I wanted to add text to the PDF, e.g., Mr. Jones, wher
Merlin wrote:
Hi there,
I am trying to mark words inside a sentence bold. Problem is, if there
is an overlap it does not work anymore.
I am using this code: $t = str_replace($word, "$word", $text);
For eample:
Mark those words bold: adventure in singapore
Text: My adventure flying to singapore
T
mbneto wrote:
Hi,
I need to access a website (written in php) using two different
domains (www.foo.com and www.bar.com). I must see the same content.
Since the site uses session and cookie variables I was wondering if
(and how) it's possible to create a session id that is valid for the
domains I'll
I believe it's mentioned somewhere in the manual you can't do that.
func_get_arg() always return a copy. You can workaround this using an array.
Robert Meyer wrote:
Hello,
Using: PHP Version 5.0.3
I build the following function:
function Set4HTMLOut() {
$C = func_num_args();
for (
Richard Lynch wrote:
On Thu, May 12, 2005 4:43 pm, Chris Shiflett said:
From me:
The fact that it uses the character set of your current connection to
MySQL means that what your escaping function considers to be a single
quote is exactly what your database considers to be a single quote. If
these t
Richard Lynch wrote:
On Thu, May 12, 2005 6:58 am, Shaun said:
$_SERVER['HTTP_HOST']
"Mbneto" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
I need to access a website (written in php) using two different
domains (www.foo.com and www.bar.com). I must see the same content.
Since the
Bogdan Stancescu wrote:
Hello all,
I guess this comes up once in a while, does anybody know how I can find
the current PHP sessions' IDs? I don't mind if some have passed away,
and the PHP gc hasn't run yet, because I'm doing a garbage collection of
my own, for data identified by session ID -- i
Burhan Khalid wrote:
Merlin wrote:
Burhan Khalid wrote:
Merlin wrote:
Hi there,
I am wondering if there is a function (I could not find) which does
the same thing like strpos does, but with an array.
For example:
$replace = array("picture", "pics");
$pos = strpos ($term, $replace);
//
Richard Lynch wrote:
On Fri, May 13, 2005 1:06 am, Marek Kilimajer said:
Richard Lynch wrote:
On Thu, May 12, 2005 6:58 am, Shaun said:
$_SERVER['HTTP_HOST']
"Mbneto" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Hi,
I need to access a website (written i
Richard Lynch wrote:
On Fri, May 13, 2005 12:51 am, Marek Kilimajer said:
Richard Lynch wrote:
On Thu, May 12, 2005 4:43 pm, Chris Shiflett said:
From me:
The fact that it uses the character set of your current connection to
MySQL means that what your escaping function considers to be a single
Bogdan Stancescu wrote:
Ok, I went with the solution you recommended, by the way of a "thank
you" to the list, here's the resulting function:
/**
* This function returns the IDs of the current PHP sessions.
* At this time, it only works with
* [EMAIL PROTECTED] http://www.php.net/manual/en/ref.se
blackwater dev wrote:
Hello,
this works fine:
$name="fido";
$string="my dog's name is $name";
echo $string;//prints my dog's name is fido
but when I store the string "my dog's name is $name" in the db and pull it out:
//do the query
$row=$datab->fetch();
$name="fido";
$string=$name['db_column'];
ec
Lee Chen wrote:
If the server uses hub ( to make more computer connect online), can' I
upload files
to that server??
if you can post forms, you can upload files.
I face a problem like this , and I think that's the hub causing this
problem.
Did it?
what is "like this"?
--
PHP General Mailing List
Ville Mattila wrote:
Leif Gregory wrote:
session_destroy();
session_start();
session_write_close();
Header("Location: ...");
exit;
I never tried regenerate. Just started a new session again.
Hi Leif!
Thanks for your reply. For some strange reason, this works not for me.
The session cookie will no
Ville Mattila wrote:
Marek Kilimajer wrote:
the cookie variable still persists. you need to
uset($_REQUEST[session_name()], $_COOKIES[session_name()] ...);
Thanks Marek for a reply.
I'm not sure but I have been thinking that unset($_COOKIES) does not
destroy the cookie from the client sid
Lee Chen wrote:
Thanks for all of your helping.
I think now maybe it's not the serve's problem because I CAN post forms and
even I can upload some smaller size files.
Then the following is my problem:
This is the script of " justtest.php" :
justtest.php
I can upload a file of size 7KB, but whe
mayo wrote:
I'm having a little problem adding to an array. Each time I add to an
array it wipes what was previously added. I'm using array_push().
$items=array();
$items=array_push($items, $_POST["whatever"]);
I'm missing something easy.
thx
array_push() returns the number of elements in
Robert Meyer wrote:
Hello,
Scenario:
1) User is presented a blank form.
2) User fills in form.
3) User submits form.
4) Record is added to database.
5) Back to 1).
Go really back to 1) - use redirect. After the record is added to the
database, use something like:
header('Location: http://yourserve
Robert Meyer wrote:
"Marek Kilimajer" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Robert Meyer wrote:
Hello,
Scenario:
1) User is presented a blank form.
2) User fills in form.
3) User submits form.
4) Record is added to database.
5) Back to 1).
Go really
Rahul S. Johari wrote:
Ave,
A simple Image Verification script is working perfect in IE on Windows...
But isn¹t working in Safari on Mac OS X! It displays a blank page instead of
the image with the form. Here¹ s the Script:
Because only Safari gets it right. With the above line you are saing
this
Rahul S. Johari wrote:
On 5/18/05 6:23 PM, "Marek Kilimajer" <[EMAIL PROTECTED]> wrote:
BTW, you might not be concerned about it much, but you have a race
condition in your script.
Ave,
What do you mean by "race condition" ?
If more then one user is accesing the pag
Mark Sargent wrote:
Hi All,
how would one get them to display in php pages..? Is it like ASP where
you have to set a codepage number..? I've set this at the top of my pages,
and this for the font
$product_data_output
I don't claim to know much about HTML either. I'm just building a little
dynami
Jim & Sara Feldman wrote:
Hi:
I have a partially finished app using PHP and MySQL that runs on Mac G4
running System 10.3.9. Undoubtedly, I upgraded too many things all at
the same time. Something broke. PHP and MySQL are both running. I can
use the latest phpMyADMIN and everything is there
Richard Lynch wrote:
On Thu, May 19, 2005 6:05 am, Rahul S. Johari said:
I did actually remove the Header which declared it as a Image/PNG and
everything seemed to work in both the browsers.
Great. Now it works in 2 browsers, and breaks in 237.
You MUST separate the two.
Actualy he alway
Christopher J. Bottaro wrote:
Jochem Maas wrote:
Christopher J. Bottaro wrote:
Maybe I'm using "reentrant" incorrectly, but here is what I mean...
class Test {
function __get($nm) {
if ($nm == 'x')
return $this->func();
elseif ($nm == 'y')
return 'y';
else
Mike Zornek wrote:
Is it true I can't include a file up a dir like this:
require_once '../config.php';
This seems to work though:
require_once 'settings/db.php';
Strange.
Both works as long as other settings permit it - file permission and
owner, safe mode restrictions
--
PHP General Mailing
Red Wingate wrote:
http://de.php.net/filemtime
[quote]
As of PHP 5.0.0 this function can also be used with some URL wrappers. Refer
to Appendix J for a listing of which wrappers support stat() family of
functionality.
[/quote]
-- red
As you likely don't have PHP5 installed, use fsockopen, file
This answers it all: http://sk.php.net/addslashes#28429
AgfTech Lists wrote:
Hi All
Following is the INSERT statement I am executing,
snip >>
INSERT INTO customer (email, password, handle, fname, lname, company,
tax_id, addr1, addr2, city, state, zipcode, country, dayph
Nathan Mealey wrote:
Anyone who is familiar with using FPDF to generate PDFs, I'd really
appreciate some suggestions here:
I am using the following code, virtually identical to that used in the
FPDF tutorial examples. But I keep getting a parse error for the first
line containing the variable
I found only one problem - you must lock the session file when the
session is open and unlock it when closed. There is a user note in the
manual that explains it.
Will wrote:
Hello all,
Due to my need to have the whole session data file encrypted. I am thinking about using custom session funct
pete M wrote:
Am trying to increae the session lifetime to 8 hours ish
using this code
ini_set('session.gc_maxlifetime',28800);
does not work ?
any ideas
Pete
There are 3 conditions that must be met:
1. You must set it before session_start()
2. No other application can access your session stor
Anthony Ritter wrote:
Any other thoughts?
Best...
TR
...
You said register globals are off, didn't you? Where is the above
variable set then?
:)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Anthony Ritter wrote:
However when clicking the getdata.php link - the file does not appear on the
screen.
The code is below.
Thank you for your time.
TR
.
//getdata.php
Remove @'s while debugging.
@mysql_select_db("sitename");
$query = "SELECT bin_data,description,filetype
Chris W wrote:
Justin French wrote:
On 18/04/2004, at 10:35 AM, Chris W wrote:
So now I am out of ideas and was wondering if anyone here had any.
We're getting a little OT, but it's possible that a bookmarklet (a
JavaScript bookmark) installed on all browsers you use could act as
the method o
Pooya Eslami wrote:
Yes, the server supports php, and I don't want to make it into a php file
because its a big html file and I just need this little script on it. Why
cannot I embed php in html files?
The server does not parse html files for php so that it does not waste
CPU on parsing files that
[EMAIL PROTECTED] wrote:
Hi there I was wondering how people usually turn the app off during system
maintainance. During the hours of 6-7 the database goes down for backing
up, the users therefore keeping trying to get into the system, i get an
error that the database is down when i know it should
OrangeHairedBoy wrote:
I would like to use eval() to evaluate another PHP file and store the output
of that file in a string.
So, let's say, for example, that I have a file called colors.php which
contains this:
Colors:
Then, in another file, I have this:
$file = file_get_contents( "colors.php"
Ravi kumar wrote:
HI,
goole.com found so many details about safe mode too much to understand.
My hosting provider set php safe mode = enable . so iam unable to use so
many scripts .
can any one give good free image gallery software which will work under
safe mode = enable .
is it true that wi
Search for "php tutorial"
Ashwin Purohit wrote:
Hi all,
I have a website where I have uploaded a few of my drawings, etc. I want
to know how to write a simple php script so that people can post
comments beneath the pictures for all to view. If somebody could point
me to some tutorial or run me
Richard Davey wrote:
Hi all,
I know from a code point of view it makes no difference at all (i.e.
they both work), but which format do you all use for booleans?
TRUE / FALSE
or
true / false
The PHP manual uses both :) Zend Studio tries to auto-complete to the
lower-case variant.
I'm not seeking
casi wrote:
Hi guys,
I have a php site running in an infinite loop in order to have a
permanent tcpip connection with fsockopen to another server. Now the
user should be able to make an input. As the php is running in the
infinite loop, the html
Is there a possibility to get the inputs with ja
Ryan A wrote:
Hey John,
Thanks for replying.
I cant use strip slashes because there are a number of scripts doing DB
things and searching for all of them and modifying things just for one
client can be a royal PITA.
I tried to use "php_flag magic_quotes_gpc off" in the *existing* .htaccess
file lik
Torsten Roehr wrote:
"Noel Da Costa" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Thanks for the thought...
I was using getenv('PATH_INFO'). I tried $_SERVER['PATH_INFO'], but it
didn't help.
PATH_INFO is working, ie being filled, but Apache doesn't seem to know
what
to do with it
I'm not sure if it will help but do't define the magic functions as
public static, use just:
function __get(...)
The function is not public anyway, as it should no be called directly.
And to my knowledge self:: references a class, not an object. You should
use $this-> instead.
David Goodlad s
Hmm, this will certainly slow down PHP5 acceptance. I cannot imagine a
hosting company that will upgrade to PHP5 and break so many client's
applications.
Johannes Reichardt wrote:
Hi there,
i don´t know if this is the right place to ask but since there are a lot
of cracks around i thought i th
I just installed php5 (finaly :-)) and it does not throw any error nor
warning. I think what you see is Notice, so the behavior did not change.
Johannes Reichardt wrote:
Hi there,
i don´t know if this is the right place to ask but since there are a lot
of cracks around i thought i throw this i
Curt Zirzow wrote:
Here is the offending situation:
/* E_NOTICE: undefined index, returns false */
unset($a);
echo is_array($a['foo']['asdf']);
/* returns false */
$a = 'asdf';
echo isset($a['foo']['asdf']);
/* returns false */
$a = array('foo' => 'asdf');
echo is_array($a['foo']['asdf']);
/* E_
Mark Charette wrote:
From: Marek Kilimajer [mailto:[EMAIL PROTECTED]
Well, what I always know about my variables is if they are arrays or
scalar ;) And I don't consider warning to be much nicer then error
Hmmm ... my current methods and functions in PHP 4.x oftentimes adapt to the
type p
Richard A. DeVenezia wrote:
I am wondering if it is possible to let two or more scripts share a common
session id ?
I am guessing not, but would like to be proved wrong.
I might get you wrong, but unless you take some precausions all scripts
on a single domain share common session id.
--
PHP Gene
Jeff McKeon wrote:
No... PHP and JavaScript are executing at different time and
at different place. Besides, they are executed by different programs.
Are you trying to measure execution time of a query??
Look at:
http://www.php.net/microtime
No, I'm trying to get a little animation on the lef
Jay Blanchard wrote:
Is it possible to pass arguements when using PHP before 4.3.n when doing
command line stuff?
I have built a small script that opens a file, reads from it, and
returns some results. Instead of changing the fopen line each time I
would just like to pass the name of the file to be
Aaron Wolski wrote:
Hi all,
Can anyone point me in the direction of a site search engine that reads
files in a directory find relevant results for an search term that a
person might enter on a site?
I need to build a site search engine but the problem is. the site isn't
dynamic (yet) so I need
[EMAIL PROTECTED] wrote:
hi,
I'm working on a project and i need to modify some pdf files before
printing them.
In fact, i got some pdf models, and a database which contains informations
to print. I want to add this informations in pdf files and then start
printing. My problem at this time is that
Michal Migurski wrote:
Isn't this potentially a DoS attack vector anyway? I don't need a server
to accept or read my obscenely long POST requests to clog the pipes with
them. Would the proper way to handle this risk be to disallow POST at the
webserver level, or does turning always_populate_raw_pos
CurlyBraces Technologies ( Pvt ) Ltd wrote:
hi ,
i want to export data in mysql to excel . but problem is mysql runs in the linux
machine ,
How can i get that data from mysql-Linux machine to windows-Excel machine , plz help
asap
thanx in advance
curlys
There are few classes that can create na
Brent Clark wrote:
Hi all
I have the following php code:
echo" \n";
I now have the following javascript code:
Select all
Invert selection
use and
document.frm.elements['frow[]'][i].checked. And you will get javascript
error if you refer to document.frm.frow as both array and object, use
typ
Ninti Systems wrote:
I've searched the archives on this and, while I have turned up some
tips, they don't seem to solve my problem.
I an building a website for an indigenous organisation where jpg images
are uploaded, resized to a standard format, and thumbnails also
generated at the same time (so
René Fournier wrote:
I don't know C, but I was wondering if it is possible to:
1. Define 32-bit integer in PHP, called $val (max value of $val);
2. Assign the value of 10 to $val.
3. Pack $val to a binary variable ($bin_var);
...such that $val is only equal to 10, but it is occupying 32-bits of
d
Something like:
select , IF(title_keywords like \"%$word1%\" or body_keywords like
\"%$word1%\", 1, 0) + IF(title_keywords like \"%$word2%\" or
body_keywords like \"%$word2%\", 1, 0) as relevance .. ORDER BY
relevance
I hope you get the point.
Dave Carrera wrote:
Hi List,
I think thi
Craig Donnelly wrote:
Why not just use a .php instead of a .js?
Regards,
Craig
That was what I meant ;)
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Natascha Chrobok wrote:
How can I get the numeric Index of an array when the index is a string?
string indexes don't have numeric indexes. they are in order however, if
you want to find the order of a value, use:
echo array_search(array_search("my second value", $myArray),
array_keys($myArray))
Dave Carrera wrote:
Hi List,
How can I set fopen to time out if a url is not reachable ?
I have tried set_time_limit but that dose not seem to work.
Thank you in advance for any help or pointers.
Dave C
I'm not sure it will help but try ini_set('default_socket_timeout', XX);
---
Outgoing mail
msa wrote:
My date format is as aboveI am getting the following error message:
You have an error in your SQL syntax. Check the manual that corresponds to
your MySQL server version for the right syntax to use near 'Y') . ' AND
MONTH(date) = ' . date('m') . ' ORDER BY sort DESC'
I changed your co
http server needs write permission to the directory
(../../secure/Admin/Orders/). Permission on the file do not matter.
Aaron Wolski wrote:
Hey all,
I have a script that DDI work but for some reason it no longer does.
It attempts to unlink a file before writing a new file.
The code for it is:
unl
René Fournier wrote:
Can anyone suggest why this script (well, part of the script) fails on
the "while(($bug=socket_read..." line after it successfully loops
several times? (Of course, it is only after it timesout, but that is
what I need it to do.)
---CODE--
$ms
foreach($_POST as $key => $parole) {
echo "$key = $parole ";
}
Dino Costantini wrote:
i know it could be a stupid problem, but i need a help and i hope u could be generous with me :).
this is my code, it writes the list of POST and GET variables.
";
foreach($_GET as $parole)
{
echo "Parola =
Merlin wrote:
Hi there,
I am having trouble with ram memory. After about a day the system starts
to swap. After doing a bit of research I found that a possible reason
could be the missing of the imagedestroy() function.
There is a question I have on that. Inside a function I add sometimes
water
Steve Magruder - WebCommons.org wrote:
File_exists results (and the results from other file-related functions) are
cached (according to the php doc) during the run of a script. For instance,
if file_exists returns True for a file once, it won't actually test the file
again if file_exists is run ag
John Taylor-Johnston wrote:
Gowthaman,
Just at a glance, it seems that you Should Only receive One value.
'Name=protid' tells me that you have only created one value.
Because they ALL have the SAME name="protid" there will be only one value.
This would be more evident if they were type=radiobox. W
Mario wrote:
Hi all
I have a list of products with prices
e.g.
$100
$100.50
(those are examples, they can be anything, not all prices have decimal)
when I add those I get $200.5.
Is there a way to get $200.50.
Thanks
Mario
You want to format the number? Use number_format()
PS: Don't hijack threads.
John Taylor-Johnston wrote:
Or give all name="protid[]" and you will get array $_POST['protid'] that
you can loop over.
Do it like this or you will have the same problem.
name="protid[0]"
name="protid[1]"
name="protid[2]"
Not true.
--
PHP General Mailing List (http://www.php.net/)
To unsubscri
Steve Douville wrote:
I'm got a query that is joining a few tables.
select
par.*, pla.*, pro.*, reg.*
from parent par, players pla, registrations reg, programs pro
where blah blah blah
Now, a result set is the same but I'm having trouble parsing it because I
have column names that are i
GodFoca wrote:
Heyp! I wanted to know if there is some way to do the submitting of a form
from a normal href link, instead of the big-dumb-gray button.
If it can't be done with PHP, how can it be done?
Thanks in advance,
Nicolas Sanguinetti
Thought it is possible to use javascript as suggested by J
Merlin wrote:
Hi there,
I am trying to prevent hotlinking of images by other servers.
Pictures are generated on the fly by a php script, where I have included
this code to prevent hot linking:
$haystack = $_SERVER['HTTP_REFERER'];
$needle = 'globosapiens';
$pos = strpos($haystack, $needle);