[PHP] About Preg Match patterns

2012-08-01 Thread Tolga
hi, i have a question, i dont know what keywords to search, so im asking 
here.


while using preg_match, there are lots of thing that can be written as 
$pattern.

for example:
preg_match("/php/i", "PHP is the web scripting language of choice.")

what is the meaning of  /i  ?
or '@^(?:http://)?([^/]+)@i'  there are lots of chars here,

or this: /(?P\w+): (?P\d+)/
/[^\\d\\sa-zA-Z$_]/
/^[a-zA-Z\p{Cyrillic}0-9\s\-]+$/u(there is a extra "/u" )

#^http:\/\/(.*)\.(gif|png|jpg)$#i
#(.*?)<\/head>#si

there is lots and lots of different usage of these.

my question is, where can i find a very detailed information about these 
? i want and need to know whats what about these.


Thanks,
tolga.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] about unlink

2012-08-13 Thread Tolga

hi, i have a very annoying problem with unlink()
i use win7 and wamp server (apache 2.2.22 & php 5.4.3)
when i try to use unlink:

SCREAM: Error suppression ignored for
Warning: unlink(aaa/bbb.ccc): Permission denied in 
C:\wamp\www\ddd\index.php on line /34/


neither the folder, nor the files are read-only. i give every user on 
win, all the permissions on folders & files.
i look on google for same error, but nothing useful. some says 'you need 
to give PHP delete permission' but didnt say how. i run wamp with Run as 
Administrator.
by the way, php can write, create 
(copy(),file_put_contents(),move_uploaded_file(),mkdir()) files or 
folders. there is no problem with it and there is no problem with 
deleting (rmdir)  folders too. but there is problem when it comes to the 
deleting files.


i really need some suggestions about how to solve this, its really 
annoying and  i dont want to throw my pc to the wall or punch it on the 
screen.


Re: [PHP] Web User Management

2013-01-30 Thread Tolga
i dont know why, but without framework, it seems to me easier done than 
said. :)


30.01.2013 06:18 tarihinde, Adolfo Olivera yazdı:

Hi,

I'm about to start a little project using PHP and MySQL. It involves
some basic user management. Like most web systems. Users would need to be
able to:



1 Create Accounts.

2 Update and recover passwords.

3 Maintain a session to operate.
4 Something else I might be forgetting.



My questions are

1 Is there some kind of library, framework I could utilize to save me some
work?

2 Any thoughts, lessons learned from more senior programmers, I'm fairly
new with PHP.




--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] 2 submit buttons.

2011-02-14 Thread tolga

15.02.2011 00:24, Paul M Foster yazmış:

On Mon, Feb 14, 2011 at 05:15:11PM -0500, Floyd Resler wrote:


On Feb 14, 2011, at 4:18 PM, Paul M Foster wrote:


On Mon, Feb 14, 2011 at 03:35:02PM -0400, Paul Halliday wrote:


I have 2 buttons on a page:

if (isset($_POST['botton1'])) {dothing1();} if
(isset($_POST['button2'])) {dothing2();}

They both work as intended when I click on them. If however I click
within a text box and hit enter, they both fire.

Is there a way to stop this?

Check your code. My experience has been that forms with multiple
submits will fire the *first* submit in the form when you hit Enter
in a text field or whatever. I just tested this and found it to be
true.

Now, I'm doing this in Firefox on Linux. I suppose there could be
differences among browsers, but I suspect that the specs for HTML
mandate the behavior I describe.

Paul


If you don't mind using a little JavaScript you can test for which
button should fire when enter is pressed.  How I would do it is to
first add a hidden field and call it "buttonClicked".  Now, in the
text field where you would like a button to fire if enter is pressed,
at this to the tag: onkeyup="checkKey(this,event)".  For the
JavaScript portion of it, do this:

Yeah, but you don't even have to go that far. Just put a print_r($_POST)
at the beginning of the file, and you'll see which button gets pressed.
It will show up in the POST array.

Paul


this could also work;
JS:
function send ( selectedtype )
{
document.formname.postingvalue.value = selectedtype ;
document.formname.submit() ;
}
html:


Button 1
Button 2
Button 3
php:
if($_POST['postingvalue']=="1")
{ code here } elseif ($_POST['postingvalue']=="1")
{ code 2 here } bla bla

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New to list and to PHP

2011-02-20 Thread tolga

21.02.2011 01:41, Richard Quadling yazmış:

On 20 February 2011 23:34, Richard Quadling  wrote:

On 18 February 2011 19:03, Pete Woodhead  wrote:

Hi I'm Pete Woodhead.  I'm new to the list and to PHP.  To be honest I very
new to code writing.
Thought this would be a good way to learn good habits as well as good code
writing.
Looking forward to learning and participating.


Assume that all the data you get from the user is out to get you. It
probably isn't. Most of the time. But when it does, it'll be your
fault. Unless you've left the company by then.

Also, poka-yoke is a great concept to learn about (thanks to a great
article in php|Architect all the way back when).

Richard.

--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY


http://www.phparch.com/magazine/2006-2/february/ in case anyone was wondering.

i'm interested in php about 3 maybe 4 years but i still couldnt get the 
logic of classes. it makes no sense to me. i couldnt understand whats 
about classes good at or how to use or write it. and i can say that " is 
'class' really necessery? "


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New to list and to PHP

2011-02-20 Thread tolga

21.02.2011 03:21, Tamara Temple yazmış:


On Feb 20, 2011, at 5:51 PM, tolga wrote:


21.02.2011 01:41, Richard Quadling yazmış:
On 20 February 2011 23:34, Richard Quadling  
wrote:
On 18 February 2011 19:03, Pete 
Woodhead  wrote:
Hi I'm Pete Woodhead.  I'm new to the list and to PHP.  To be 
honest I very

new to code writing.
Thought this would be a good way to learn good habits as well as 
good code

writing.
Looking forward to learning and participating.


Assume that all the data you get from the user is out to get you. It
probably isn't. Most of the time. But when it does, it'll be your
fault. Unless you've left the company by then.

Also, poka-yoke is a great concept to learn about (thanks to a great
article in php|Architect all the way back when).

Richard.

--
Richard Quadling
Twitter : EE : Zend
@RQuadling : e-e.com/M_248814.html : bit.ly/9O8vFY

http://www.phparch.com/magazine/2006-2/february/ in case anyone was 
wondering.


i'm interested in php about 3 maybe 4 years but i still couldnt get 
the logic of classes. it makes no sense to me. i couldnt understand 
whats about classes good at or how to use or write it. and i can say 
that " is 'class' really necessery? "


a class is construct of Object Oriented PHP. If you don't understand 
object oriented programming, you'll likely not understand the use of 
object and classes in PHP, either. There are good reasons to use 
object oriented principles in PHP and other langages, and good reasons 
to use procedural principles in PHP as well. Learning when to use 
either is important. Learning how to use classes someone else 
implements is also important to keep from re-re-re-re-re-reinventing 
the wheel.



thanks. are there any high detailed explanation of classes in php? 
except for php.net, cuz i didnt understand anything from there about 
classes.


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] New to list and to PHP

2011-02-20 Thread tolga

ahaha lol.
the point of my ask here is that i want to find a trusted source, not 
seo based web sites with no info inside.

but thats cool.

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] preprocessing

2001-05-17 Thread Tolga \"thorr\" Orhon

Well, one solution may be (although might not easy) to make your page A to
submit to page B which process information and submits to page C via PHP -
Curl functions. You may POST variables and even use SSL connection. It
worked just fine for me. It is more reliable any javascript solution and
restricts users accessing page B.

thorr

<[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
>
> I have what I feel to be a strange problem (I'm most likely wrong here).
> I have page A, which is an internal page, which posts to page C which is
external (belongs to another company). What I would like is to insert a
preprocessing script (let's call it page b). So, the end result would be,
users input data to page a, page a then posts to page b, page b processes
all variables etc and then posts to page c. I don't want the customer, to
ever really have to interact with page b. Is that possible?
> If there is a command to do this, which I must've missed, that would
really be all I need ;)
>
> Louis G
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] A universal Database Class

2001-05-17 Thread Tolga \"thorr\" Orhon

PHPLib may be another option.

"Brandon Orther" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Hello,
>
> I am making a suite of online tools.  Right Now I am connecting to a MS
SQL
> 2000 database.  Is there any class out there that will let you send a
query
> to more than just one type of databases?  Like someone could run it off a
> MSSQL server and another could run it off a MySQL database.
>
> thanks
> Brandon
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




[PHP] Re: mailing list php-general@lists.php.netµÄ×Ô¶¯»ØÐÅ

2001-05-17 Thread Tolga \" thorr\" Orhon

??
- Original Message -
From: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, May 17, 2001 4:17 PM
Subject: mailing list [EMAIL PROTECTED]µÄ×Ô¶¯»ØÐÅ


>ºÜ¸ßÐËÊÕµ½ÄãµÄÓʼþ£¡
>
>
> ===
> Ãâ·Ñµç×ÓÓÊÏä http://home.sina.com.cn


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Why is this not working

2001-05-17 Thread Tolga \"thorr\" Orhon

May be you need to use absolute path for htpasswd. eg. /usr/bin/htpasswd
Did u check for any error msgs?

thorr

""YoBro"" <[EMAIL PROTECTED]> wrote in message
9e1fcd$pir$[EMAIL PROTECTED]">news:9e1fcd$pir$[EMAIL PROTECTED]...
> After much investigation through many newsgroups and websites, I found out
> that this is the way you can execute a unix apache command to add a user
to
> the htpasswd list with PHP.
>
> Problem is, it doesn't add any information to the htpasswd file.
> Note: The example below is...
> domain = my user name
> abc = user name to add to htpasswd list
> pass = password to add to htpasswd list
>
>  passthru ("htpasswd -b /users/domain/.htpasswd abc pass");
> ?>
>
> Please Help if you can.
>
> Cheers,
> YoBro
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Why is this not working

2001-05-17 Thread Tolga \"thorr\" Orhon

I mean the absolute path for executable.



thorr

""YoBro"" <[EMAIL PROTECTED]> wrote in message
9e1gb1$jnn$[EMAIL PROTECTED]">news:9e1gb1$jnn$[EMAIL PROTECTED]...
> My message described the absolute path with the provider I use.
>
> I am able to download the .htpasswd file from
> /users/domain/
>
> Still not working though.
>
> ""Tolga "thorr" Orhon"" <[EMAIL PROTECTED]> wrote in message
> 9e1fth$vi3$[EMAIL PROTECTED]">news:9e1fth$vi3$[EMAIL PROTECTED]...
> > May be you need to use absolute path for htpasswd. eg. /usr/bin/htpasswd
> > Did u check for any error msgs?
> >
> > thorr
> >
> > ""YoBro"" <[EMAIL PROTECTED]> wrote in message
> > 9e1fcd$pir$[EMAIL PROTECTED]">news:9e1fcd$pir$[EMAIL PROTECTED]...
> > > After much investigation through many newsgroups and websites, I found
> out
> > > that this is the way you can execute a unix apache command to add a
user
> > to
> > > the htpasswd list with PHP.
> > >
> > > Problem is, it doesn't add any information to the htpasswd file.
> > > Note: The example below is...
> > > domain = my user name
> > > abc = user name to add to htpasswd list
> > > pass = password to add to htpasswd list
> > >
> > >  > > passthru ("htpasswd -b /users/domain/.htpasswd abc pass");
> > > ?>
> > >
> > > Please Help if you can.
> > >
> > > Cheers,
> > > YoBro
> > >
> > >
> > >
> > > --
> > > PHP General Mailing List (http://www.php.net/)
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > > To contact the list administrators, e-mail:
[EMAIL PROTECTED]
> > >
> >
> >
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > To contact the list administrators, e-mail: [EMAIL PROTECTED]
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] HTTP socket connection

2001-05-18 Thread Tolga \"thorr\" Orhon

As far as I know you cant do that with standard socket connection as SSL
needs more than that. One solution that I am currently using is using Curl
extensions of PHP which is working just fine. But you may need to recompile
PHP with curl support. For more info:

http://www.php.net/manual/en/ref.curl.php
http://curl.haxx.se/

Tolga 'thorr' Orhon

"Todd Cary" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> For my http socket connection, I am using
>
>"POST $abs_url HTTP/1.0\r\n".
>"Accept-Language: en-us\r\n".
>"Host: $host:$port\r\n".
>"Connection: close\r\n".
>"Content-type: application/x-www-form-urlencoded\r\n".
>
> which works great.
>
> What do I need to change for a SSL connection?
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Random number

2001-05-18 Thread Tolga \"thorr\" Orhon

If you need just plain random number generator check manual. If you want a
true pseudo-random number generator you may want to check:
http://www.ulib.org/webRoot/Books/Numerical_Recipes/bookcpdf.html

Those generators used in scientific calculations where true reproducible and
low correlated random numbers needed. Although book is for C you can easily
port them to PHP.

But for daily life, rand() in PHP is more than sufficient.

--
Tolga 'thorr' Orhon
""Daniel Coronel"" <[EMAIL PROTECTED]> wrote in message
003401c0dfce$14f60b60$[EMAIL PROTECTED]">news:003401c0dfce$14f60b60$[EMAIL PROTECTED]...
Hi!
I need to really generate a random number in a function but not like doing
it.
Somebody could help me. Thanks.

Daniel Coronel.




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] sending attachements with mail

2001-05-21 Thread Tolga \"thorr\" Orhon

Yes you can do it, but it takes some time as you need to know MIME
extensions. It took 2 hours to implement just picture attachments. It will
surely be easier to use some kind of script but I couldnt find any that gets
attachments direcly (as I am getting attachments from MySql DB) so I did my
own.

--
Tolga 'thorr' Orhon

"Mark Wouters" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> Nobody knows if it's possible to send attachements with mail()??
>
> Thanks,
>
> --
> Mark Wouters
> eXpanded Media
> Web Designer
> Parijsstraat 74, B-3000 Leuven - Louvain
> Tel: +32 (16) 31.10.12
> Fax: +32 (16) 31.10.19
> E-mail: [EMAIL PROTECTED]
> URL: http://www.expandedmedia.be
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Max execution time exceeded in Unknown on line 0

2001-05-21 Thread Tolga \"thorr\" Orhon

I had a smilar problem. My system was working just fine with php 4.0.4pl1,
apache 1.3.14 and mysql 3.23.33. Then I upgraded system to php 4.0.5 with
curl and dom-xml support, and other components are same, I am getting the
same error. Besides each apache process eats all cpu avaliable. Other than
that everything works just fine, eg I am getting pages correctly, can reach
database etc. Whenever I have time, I will try to isolate the problem.

I have only one question, is your server a multiprocessor system? I got some
information about problems in apache + php on SMP systems on some versions.

It is just like solving puzzle in Batman. Which products will kill you when
combined :)) If you find something, let me know too.

--
Tolga 'thorr' Orhon

""David De Graff"" <[EMAIL PROTECTED]> wrote in message
003401c0e103$3f4a7690$[EMAIL PROTECTED]">news:003401c0e103$3f4a7690$[EMAIL PROTECTED]...
> Hi,
>
> I've had php (4.0.5) working fine with postgres and w-agora (forum
> software),  but am now having trouble after trying installs of php-nuke
and
> phpWebSite. These use mysql, which has also been freshly installed.
>
> After a reboot the  tag executes immediately, but after
> trying to execute a php script from one of the new web apps all php
scripts
> perform very slowly and the results include the following error at the
> bottom of the page:
>
> Fatal error: Maximum execution time of 30 seconds exceeded in Unknown on
> line 0
>
> This happens even for a test page with nothing but the 
> tag.
>
> It does seem like php is connecting to mysql, since the results that are
> eventually returned include database-depended content. For phpinfo() most
> results are returned immediately but the page hangs after the php
variables
> heading, and results for this page are not returned until the 30 second
time
> limit is apparently reached. Then those results are displayed, followed by
> the error described above.
>
> Other pages, say the admin.php page for phpWebSite, don't return anything
> until the time limit expires. Then what seems to be the entire page is
> displayed, followed by the same error line.
>
> Any help would be much appreciated. I've been beating my head against this
> for quite a while.
>
> Thanks,
>
> Dave De Graff
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] function to complete strings with white spaces on the left

2001-05-21 Thread Tolga \"thorr\" Orhon

One improvment:

$strpad = "HELLO";
echo str_pad(substr($strpad,0,17),17);

may be more generic and secure...

--
Tolga 'thorr' Orhon

"Mark Maggelet" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
On Sun, 20 May 2001 22:03:05 -0300, Carlos Fernando Scheidecker
Antunes ([EMAIL PROTECTED]) wrote:
>Hello All,
>
>I need to output a string that must always be 17 characters even if
>the inside value is not.
>
>Supose a have the HELLO word that is a 5 character string and I need
>to output "HELLO" which is 17 characters.
>How can I accomplish this in PHP4 ?
>
>Has anyone ever did it?

echo str_pad("HELLO",17);



--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Syntax for CURL

2001-05-21 Thread Tolga \"thorr\" Orhon

The script below is working fine for me:

$data2send = "field1=value1&field2=value2";

$ch = curl_init();

curl_setopt($ch, CURLOPT_URL,"https://www.postside.com/postpage";);
curl_setopt($ch, CURLOPT_RETURNTRANSFER,1);
curl_setopt ($ch, CURLOPT_USERAGENT, "Mozilla/4.0 (compatible; MSIE 5.01;
Windows NT 5.0)");
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);
curl_setopt($ch, CURLOPT_REFERER, "https://www.yoursite.com/";);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data2send);
$result=curl_exec ($ch);
curl_close ($ch);

You can find meanings of options at:
http://www.php.net/manual/en/function.curl-setopt.php

Some guidelines for options:
USERAGENT is sometimes necessary on some sites as they do not let you
connect if your browser is not known.
FOLLOWLOCATION is necessary for following redirects on posting page.

You can find others easily.

Yours,

--
Tolga 'thorr' Orhon

"Todd Cary" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I need to send a POST string to a HTTPS server and receive the returned
> string.  Does anyone know the correct syntax for this?  I have looked at
> the HELP a www.php.net; however, I am not completely clear on what I
> need to put into the curl_setopt().
>
> Todd
>
> --
> Todd Cary
> Ariste Software
> [EMAIL PROTECTED]
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] best way to flush stdout?

2001-05-21 Thread Tolga \"thorr\" Orhon

I am not sure that it is the best way to do it but here is my solution:
I redirect the page with:

header("Location: page1.php);

to page1.php which contains a message about the process in progress then
after a few moments redirecting to page2.php with javascript:


setTimeout("redirect()", 500)
function redirect()
{
  window.location = "page2.php"
}


In this case it redirects in 500msecs, ie half second. Then page2.php done
the real job which is MySql query but does not display results or send
anything to browser untill query completed. In that case the previous output
stays on screen until the query completed.

I know that it is not a efficient method but a solution. If anyone knows how
to refresh a browser at anytime I will glad to know. And if someone knows if
there is a way to refresh only one part of browser (I mean just inside a
layer or so..) I really want to know. In that case one can show results as
they come from database. It is really good if you have a huge database and
searching on multiple tables and/or databases.

yours,
--
Tolga 'thorr' Orhon

"Phil Glatz" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> I have a page that displays a few lines, then runs a database query that
> takes five or six seconds. I'd like to flush stdout and display the first
> text while the query is running, so the user doesn't think the site is
> down.  What's the best way to accomplish this?  thanks
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Using html templates

2001-05-23 Thread Tolga \"thorr\" Orhon

I am using libphp and quite satisfied with it.
http://phplib.netuse.de/

--
Tolga 'thorr' Orhon

""Jamie Thompson"" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> what is the best way of using html templates to display data from a
database?
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Problems with mail() function

2001-05-23 Thread Tolga \"thorr\" Orhon

I had smilar problems before and found out that I missed some "\n"s. It
seems that you missed a "\n" at the end of headers. That might be a reason.
Another solution might be replacing "\n"s with "\r\n". I heard in newsgroups
and in some documentations that this might be problem in some systems.

I recommend to read the source of message after you get it. It is a nce way
to debug problems and gives out lots of information. (correct headres,
messages etc..)

Yours,

--
Tolga 'thorr' Orhon

""Kevin Fogleman"" <[EMAIL PROTECTED]> wrote in message
9egjrq$r15$[EMAIL PROTECTED]">news:9egjrq$r15$[EMAIL PROTECTED]...
> The problems that I'm having with the mail function stem from the extra
> arguments that I'm trying to pass it.  What I'm trying to do is write a
> script to mail links to interesting stories to other people.  In doing
this,
> I want to make the mail appear that it came from the e-mail address of the
> person who wanted to send the link.  So, what I've tried so far is this:
>
> $message_subject="This message is a test";
> $extraparams="From:
>
".$HTTP_POST_VARS['youraddress']."\nReply-To:".$HTTP_POST_VARS['youraddress'
> ]."\nX-Mailer: PHP/". phpversion();
>
> $message=$message_header.$HTTP_POST_VARS['message'].$message_footer;
> $success=mail($HTTP_POST_VARS['email'], $message_subject, $message,
> $extra_params)
>or die("Whoops, looks like mail() isn't configured
in
> this installation of PHP!");
>
> The message that I recieve when I run this script has a "From:" field
> reading as the user that the script is running under on the web server,
and
> I recieve a blank message body, as well as no subject.
>
> I decided to try using the mail() function with just the first three
> arguments (i.e. the destination address, the subject, and the message
body),
> and it kind of worked, meaning that it sent me a message with the correct
> subject filled out, and the correct message body, but it was still coming
> from the same address, the name of the web server user.  Can someone help
me
> with placing the correct args in the 4th parameter to get mail() or
Sendmail
> or whatever to send a message with the correct return address and From:
> field?
>
> Thank you,
>
> Kevin Fogleman
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]