[PHP] Mailing list server with PHP frontend
Hi! I want to know if anyone knows about a good mailing list manager that has got a PHP administration frontend I've found many PHP scripts for sending newsletters and announcementes, but that's it's not what I want I want a system like Mailman, Sympa or Majordomo (the mailing list server may be programmed in Perl or whatever), but it must provide a PHP frontend for administration, subscription, etc It would be great if messages are stored in a database like MySQL and it must be free software Does this exist?? Thanks in advanced, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Mailing list server with PHP frontend
From: "Frank Keessen" <[EMAIL PROTECTED]> > Maybe is this what you want; > > http://www.eternalmart.com/ nope, I had already seen it.. that's the kind of software I found lots, it's for sending announcements via a web form to subscribed users, but it's not a mailing list server thanks anyway Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: Mailing list server with PHP frontend
From: "Manuel Lemos" <[EMAIL PROTECTED]> > You may want to try this class for creating lists with the ezmlm mailing > list manager. It has support for creating and editing the lists > properties and even has a SOAP interface for accessing the subscriptions > from remote machines. > > http://www.phpclasses.org/ezmlmmanager > ezmlm has MySQL bindings for managing the subscription records. The > messages are stored in disk files though. seems nice, but the problem is I'm not using qmail, I'm using Postfix, and ezmlm works with qmail.. :( thnx anyway!!! I'm looking into programming a PHP interface to Sympa which is programmed in Perl haven't looked at it too much yet, I hope it isn't too much complicated.. regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send mail using external server
From: "Maria Garcia Suarez" <[EMAIL PROTECTED]> > The problem is that blind copies > don't reach destination, mails in the To: field arrive > well, mails in the BCC: desappear and never reach the > mailbox (nor get back :-? [...] >talk2server("MAIL FROM: ".$from."\n"); >if (listen2server() == "250") > talk2server("RCPT TO: ".$to."\n"); > if (listen2server() == "250") > talk2server("DATA\n"); > if (listen2server() == "354") > { > $content = "Subject: $subject\r\n"; > $content .= "From: $from\r\n"; > $content .= "To: $to\r\n"; > if ($cc!="") { > $content .= "Cc: $cc\r\n"; > } > if ($bcc!="") { > $content .= "Bcc: $bcc\r\n"; > } the problem is that the script should send a "RCPT TO" for every recipient, and it only send it for $to so this script only works with the $to field, neither the $cc nor $bcc will work... moreover, the "$content .= "Bcc: $bcc\r\n";" line should not go!!! if not you are putting the info about the BCC in the mail headers and everyone will be able to see it.. regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send mail using external server
From: "Maria Garcia Suarez" <[EMAIL PROTECTED]> > Hola Juan! Hola! :) (Hi!) > Thanks for your help Juan :-) de nada!!! (you are welcome) > What should I change in the script in order to make it > work? after the "RCPT TO" for the $to variable, you should check if $cc is defined, if it is, then do the same for that variable, and then the same for $bcc also remember to remove the line I told before that adds the Bcc in the mail headers... but, IMHO, that script isn't well coded as you have already seen, and I also don't like the way it's programmed, it's very rudimentary... I would use phpmailer as someone told you before instead.. Besos!!! (Kisses!) Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send mail using external server
From: "Curt Zirzow" <[EMAIL PROTECTED]> > You must send the rctp to's bfore you start sending the data. To be > a more stable smtp client there should be more sanity checking before > blindy doing this: > > if ($cc != "") { > $CC = split(',', $cc); > foreach ($CC as $ccemal) { > talk2server("RCPT TO: $ccemail\n"); > } > } > > Then repeat for BCC's good!! you also included the code for her :) > Be sure to remove the bcc header, it wont be very blind if the > recipients can see who was blind carbon copied. I'm really surprised at this script... I can't believe someone posted that script for being downloaded while it has several things that are completely wrong!!! Specially the including the BCC in the header's in a way that anyone can see it!!! obviously this programmer did not have many clues on how SMTP works, and didn't waste many of his time investigating it... it really surprises me.. Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Send mail using external server
From: "Maria Garcia Suarez" <[EMAIL PROTECTED]> > With the proposed changes does it become something usable? it all depends on what you mean by "usable"!!! :oP if it works for what you want, and it satisfies your needs, then you can use it test it, and if it works ok for you, and don't want to use another one, well just do it :) regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Protecting files with PHP
I need to do the same and a .htacces file would not suite the problem I need to do as yahoogroups does When you upload a file to the Files section, it send by default an e-mail to the group members with a link to the file When you click on the link, you're sent to a login page, and after login in you get the file.. how can you achieve this with PHP?? an .htaccess file would deny the access, or ask for a username/passwd at HTTP Server level, and that is not the desired effect.. thnx in advanced, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] The stupidest question of the month.
From: "René Fournier" <[EMAIL PROTECTED]> > I need to write a little program that opens and maintains a TCP socket > connection to a server across the Internet. This little program would > wait for messages from the server it's connected to, then record those > messages and send a kinda of acknowledgment "Got it". I would a daemon programmed in C or maybe Perl Regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] else needed?
From: "Larry Brown" <[EMAIL PROTECTED]> > On if statements, I periodically don't want anything to happen if the > requisite is not met. In most cases just writing the statement in the > format if (this) { do that; } and nothing more will work. However, I > periodically get weird results with this and found the only fix was to do > a... if (this) {do that;}else{"echo "";} I experienced the same problem once... It really amazed me... I had some conditions like: if ( some_thing ){ do_something } if ( some_other_thing ){ do_something_else } if ( yet_another_thing ){ do_another_more_thing } they were stupid conditions, with no possibility of error... I checked them many times to see if I was not having some stupid error, but there was no error The results were weird, and not as expected unless I added an else statement.. It was on a Red Hat 7.1 system, but I can't remember the exact PHP version maybe it was a bug, but I had the same problem, and it was definitively not an error of my code.. Regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Setting total db size to a variable.
From: "Curt Zirzow" <[EMAIL PROTECTED]> > > I have a question in regards to finding the total db size and setting it to a variable. > > This is rather vague in several aspects. Please expand on your question > with more details, otherwise it makes it hard to help with with your > question. I think he wants to get the size of a database, and setting that value to a variable... Probably the question is not regarding on how to set the value to a variable, but on how to get the database size, which surelly depends on the RDBMs you are using (if it can be done, no idea..) :oP regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] arguments against moving site from Linux/Apache/PHP server to Windows/IIS/PHP needed
First of all, security.. Windows is full of security holes Second, a Win2k server ussually needs to be rebooted after several days of running A Linux box usually stays months and months running without any problem without having to touch it I got a Linux box running Apache + PHP + MySQL, Postfix + amavisd + uvscan, cistron-radiusd plus some other things, and it has an uptime of 388 days. And it works as the first day!!! I will pay the one who can achieve that with Windows.. Third, Apache + PHP + MySQL rock, they are very well integrated Regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] removing parts of a string...
From: <[EMAIL PROTECTED]> > I wanna be able to take a URL > http://www.mysite.com/downloads/file_1_a.pdf > > and then remove: > http;//www.mysite.com/ [...] look at preg_match() regards, -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP / Oracle support (8/9) under Redhat 9
From: "Robert Mena" <[EMAIL PROTECTED]> > a) apache > > It seems that apache + php does not work well under > heavy load so I should stick with 1.3.X right ? Any > ideas where I can find a rpm package for redhat 9 ? Yes, stick with apache-1.3.x Latest 1.3.x version RPM from Red Hat for RH 7.3 is apache-1.3.27-2.i386.rpm I'm using the latest RH 7.1 apache RPM in a RH 9 and runs ok, which is apache-1.3.27-1.7.1 Latest PHP version for RH 7.1 is php-4.1.2-7.1.6 For RH 9 it's php-4.2.2-17, I guess there should be no problem in running that version with the apache-1.3.x from RH 7.x Regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] PHP / Oracle support (8/9) under Redhat 9
From: "Robert Mena" <[EMAIL PROTECTED]> > But I'd need to compile php with oracle support. > Do you have any experience with this setup ? RH9 + PHP > with oracle support ? nope, have only used it with MySQL... the problem is that the php RPM does not have Oracle support compiled in? if it's that, then download the SRPM and compile it again with Oracle support :) regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stop neurotic posting
and please don't answer saying that you aggree or don't agree with me I don't care just cut off with this thread please :) Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] moderator: has anything on this list changed?
From: "Curt Zirzow" <[EMAIL PROTECTED]> > well, I guess we are on are own, the bcc bounced :/ what about [EMAIL PROTECTED] or [EMAIL PROTECTED] ? regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Correct Coding
> Is this the best way to do this? > if(isset($Task) && $Task == "Add") { Do something } > I want to check if the variable is set and if so, if it is "Add". why don't just do: if($Task == "Add") { Do something } regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] module to display e-mail from source
Does anyone know of any module which can display an e-mail from it's source? I mean, that it receives the mails source, and displays it as it is displayed in a webmail for example.. It should be able to hand HTML messages and attachments I searched the web and found nothing... I could take code from any PHP based Webmail and modify it a bit to do this, but maybe there's some existing module to do this.. thanks in advance, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] htmlspecialchars() and HTML code
From: "Thaddeus J. Quintin" <[EMAIL PROTECTED]> > If the HTML file that they upload has '<' or '>' entities, then > these characters will be displayed in the text area as '<' and '>' > symbols. So when the text is submitted from the textarea, all of the > user's HTML entities will have been destroyed. > Any thoughts on this problem? the uebimiau webmail, es written in PHP and supports viewing and editing HTML messages maybe you can take a look at it's code, perhaps it helps.. http://www.uebimiau.org regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: module to display e-mail from source
From: "Dan Phiffer" <[EMAIL PROTECTED]> > I don't think I've seen anything like what you're describing, but you ought > to be able to use the standard mod_imap functions to determine whether a > message has MIME components, HTML and the like, then output to the client as > desired. The problem is that I will not be reading the messages from a mailbox... They will be stored in a database, and I'll get them from there... :( Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] shell_exec
From: "Rodney Green" <[EMAIL PROTECTED]> > Hello. I've been attempting to write a script that will run a shell script > using the shell_exec function and haven't had any success with getting it to > run in the browser. My web server runs as the user 'apache.' I'm able to run > the script successfully from the command line as root but when I run it in > the browser the shell script executes but fails. Is there a way to trace > what is happening when it is being run from the browser to figure out what > the problem is? Any suggestiosn? I've set the permissions of the script to > be executable for anyone. check for errors at /var/log/httpd/error_log or at /var/log/messages regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Stop neurotic posting
This kind of opiniion wars appear every since in many of the lists I'm subscribed to. The thing is that they ussually tend to nothing, since there are always people who think on one way, and otehrs who think the other, and no matter what you say, they will continue thinking that way. I agree that there are too many lazy people who just ask "Can you tell me how to do this?" whit subjects sucha as "PLEAS HELPPP!!!", that didn't bother to RTFM or STFW. Maybe some understood with this postings what we meant about it, and maybe others didn't, or don't want to, or just think different... But the thing is that this thread is getting larger and larger, and it's even worse than baring with stupid questions... No matter what we do or say, there will always be people whjo will not bother to RTFM, or who are newbies and don't know how to search for things, or who just subscribed to the list and didn't read recent related postings and didn't bother to STFW or don't know how to do it... So, regardless of what we think, we have no other option than try to educate and point people to the right direction telling them who to do things in good manners. I've replied more than one RTFM or STFW, and many times per day I desire to do it All those sometimes stupid questions, consume your bandwidth and time, but this wars are worst... So I think we should try to educate, and if those messages bother us, and we don't want to educate, then maybe it's better to try to ignore them and just not reply to them... and let anyone who doesn't mind in wasting his/her time reply... but this person should also try to educate and not just provide code to the one who says "please tell me exavctly how to do this". Many of us have little time to investigate sometimes, but you have to do it, it's your job to do it. And if you are not a programmer and don't know how to do it, then you should not be programming, hire someone to do it... So please, we should cut off with this thread, since it will lead to nothing, and let's try to educate!!! :) Interesting link: http://catb.org/~esr/faqs/smart-questions.html and Google seraching for "netiquette" Regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] setting function variables
"Micah Montoy" <[EMAIL PROTECTED]> wrote: > Anyone know of way to do this, so I can use a generic name for all the functions > and be able to distribute it to those using either SQL Server or MySQL > without them having to go through the code and manually change it? use Pear's DB abstraction layer module check it out at: http://pear.php.net regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GPL question
If I use Smarty or PEAR on my software, does it make my software GPL? Thanks in advance, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] "back" works in opera but not in internet explorer
look where it says "Microsoft Internet Explorer Sessions Fix" at: http://www.phpfreaks.com/tutorials/41/1.php regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] some kind of redirection (not the header function)
Hi!!! I´m programming a site in PHP, where I want to do the following: I will have a set of different directories, where each directory must execute the same PHP pages, but giving as result different data, according to the directory where you are located (obtained by $_SERVER[´PHP_SELF´] for example). For example I have: http://www.domain.com/directoryA/ http://www.doamin.com/directoryB/ So each one must have (or should act as if they had) the same PHP pages and directories under them. The solution I thought, as copying each page in every directory makes no sense (if I modify the code I´ll have to change all the pages in all directories), is to have an includes directory. where I put all the PHP pages, and in each of the different directories I create pages that simply include or require the ones from the include directories. That way I´ll only modify code inone place.. Now.. is there any better way to achieve this?? I thought that maybe with some Apache stuff, but I don´t think thereś something that will help, since directives such as RedirectMatch, etc. rewrite the URL, and I don´t want that, I want the URL to remain http://www.domain.com/directoryX/whatever.php Is there any way to do this, or I should stick up with the includes?? Thnx in advance, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] some kind of redirection (not the header function)
On Thu, 2003-09-11 at 15:39, Ed Curtis wrote: > Is there any type of criteria that would point a user to directoryA or > directoryB? > > I recently rebuilt a site that handled a couple thousand > different working directories for clients but used only one set of > scripts for all. The user would have to login and variables were pulled > from a database to set the directory that they would work in. The > directory name could be passed from script to script or stored in > sessions. The beheaviour I want to acomplish is the same as in yahoorgoups. You can access a mian page, where you login and have a list of all the groups you are subscribe to. You click on the link to each one and it redirects you to: http://groups.yahoo.com/groups/yourGroup/ There it displays the page for your group with all it´s characteristics. The same behaviour if you access that URL directly. Or you can also access http://groups.yahoo.com/groups/yourGroup/messages/ etc Thatś what I ant to do :) Any ideas? thnx again, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] some kind of redirection (not the header function)
On Thu, 2003-09-11 at 16:04, Ed Curtis wrote: > I'm pretty sure that YahooGroups uses cookies for this to hold values > while you're not on their site. When you return it checks for the cookies > and reloads the values from the last visit. You can accomplish this with > PHP as well. that´s clear, I know that, but thatś not what I want... I mean, the thing is that I want to execute the same PHP scripts, no matter what directory I´m in, but show data according to what directory I´m in, exactly the same that happens with yahoogroups and it´s groups that´s why I´m thinking in putting the PHP pages in each directory which just include the common PHPs from an include directory (could use hard links either, but I prefer doing it via PHP and not depend on Os stuff) so that´s what I´m asking, if there´s a better way to achieve this, not talking about cookies :) Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] some kind of redirection (not the header function)
On Thu, 2003-09-11 at 16:20, Peter James wrote: > mod_rewrite allows you to do internal redirects. This would keep your > user's URL the same, but actually point to a different page internally. > This is, of course, depends on whether you or your host have mod_rewrite > installed. cool, it was the first thing I had thought off, but after giving a quick look at it I thought it rewrited the URLs... I´ll take a better look at it!!! Thanks!!! I guess there´s no way to do something like this only with PHP, without Apache conf, is there? thnx again, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] looking for a good FormMail PHP script
Hi I'm looking for a good FormMail PHP script which beheaves like Matt Wright's FormMail.pl script (but lacks it's exploitable problems :) I found several on the net, but didn't like them too much... any recommendations? Thanks in advance, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looking for a good FormMail PHP script
raditha dissanayake wrote: Juan Nin wrote: Hi I'm looking for a good FormMail PHP script which beheaves like Matt Wright's FormMail.pl script (but lacks it's exploitable problems :) I found several on the net, but didn't like them too much... any recommendations? you have obviously not looked at the PHP manual. First of all: despite the fact that on the manual there are always comments and code examples, it's not the obvious place where to look for that... Second, I suppose you are talking about the examples that were posted in the docs about the mail() function... that's not what I want... if I simply wanted to write a script that sends an e-mail from a defined form, I do it in 2 minutes... what I want is a generic script that can be used with ANY form, just like Matt Wright's FormMail.pl does, and that is well written, and secure, that has no spam exploitable bugs, etc, like Matt's has.. I could write it myself too, I can do it, in no more than ten minutes, but I don't want to reinvent the wheel, and maybe if I write it, despite the fact that I administer mail servers, web servers and many others, maybe I fall under some exploitable bug too... so maybe there's an existing good script already written, that many people uses, and that is known to be good? do I explain myself? I googled and found several, but looking at them, I didn't like them, because they were more like simple scripts like the ones posted in the docs of the mail() function, or the ones which were generic, for any form, weren't good, and didn't have any type of checks, and were obviously and easily exploitable.. so looking at the PHP manual is not the answer for me in this case, I don't want a 2 line script, I want something good and serious... If anyone knows of a good script of this kind, I will appreciate :) thanks again, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looking for a good FormMail PHP script
Hannes Magnusson wrote: Are we just suppost to know "Matt Wright's FormMail.pl" ? Matt Wright's FormMail.pl script is a very well known script, that's been used by thousands of people for several years. So it was very likely that many of the people who read the e-mail knew what I was talking about... This list consists not only of PHP programmers, but there are also people who know many other languages like Perl, or work administrating servers, etc, so many can know what this script is... Moreover, the name "FormMail" is quite descriptive, and there are other FormMail scripts written in several languages that acomplish the same task, so not knowing Matt's script does not mean that you don't know what a FormMail script is.. (obviously not everyone knows what a FormMail script does, but obviously not everyone in the list should know about certain topics) Or are we suppost to google to check that out so we can answear your question? I don't expect that... I have many times googled about things that someone asked on a list and I didn't know what it was.. just for me to know what it as, or to see if I could help this person... I don't expect others to do it, but it doesn't mean that someone can't do it either.. but I also expect a more polite reply than "you have obviously not read the PHP manual" or RTFM, since it was definitely and obviously not the case... I know this list is a bit differente from others, there are many newbies who use to ask "how do I do this" without RTFM or STFW, and there is a mix of *NIX, Windows and others users, and sometimes that sort of things , which are always the same, fed up people, but I was not asking some stupid question because of not RTFM... Anyway, http://pear.php.net/package-search.php?pkg_name=mail&bool=AND&submit=Search any help? nope, thos are packages for mime decoding (which I have used in other projects), access for pop or imap, or the most simple Mail package which serves for e-mail sending, just like phpMailer would do, or even the mail() function for more simple tasks... but that's not what I want... I know how to send e-mail, with mail(), with phpMailer or with PEAR::Mail, I want a good and tested FormMail script.. if I don't find one, I'll use my own written, but I don't want to reinvent the wheel.. anyway, I think I'll look in other places... thanks anyway Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] looking for a good FormMail PHP script
raditha dissanayake wrote: This mail probably shows how little you know about matt wright's FormMail more than anything else - just to give you an idea it's banned on all shared servers of our ISP. I'm very aware of the FormMail.pl's problems and bugs, and I'm definetely not going to use it... didn't you read in my previous mails, that I said that I wanted a similar script but that it lacked of Matt's script security and SPAM-exploitable problems?? If I liked Matt script, I'd just use it instead of looking for another different script, don't you think?? It seems like *you have obviuosly not read my previous e-mails* ;) Anyway, this is getting off-topic, so let's cut it here.. regards, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] GD, problem adding text to GIF images
Hi, I'm adding text to images using the native gd in PHP 4.3.9 I have no problems with jpg images, but with gif ones, the colour of the text added to the image always results a dark grey The image itself and text are fine, but not the colour, which should be white.. Has anyone experienced this problem? Used functions are: imagecreatefromgif imagettftext imagegif Thanks in advance, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] curl CUSTOMREQUEST
I saw a post at http://www.php.net/manual/en/ref.curl.php where it says: "Using the customrequest for a complete post is wrong. Libcurl will add a partial url, the http version and the standard headers after the post data - while this works with a non-persistent connection and an apache web server, it may fail under different conditions" Does anybody know a bit more on this?? (I sent an e-mail to the one who posted it, but the address does not longer exist) I tested the following code and didn't experience any problem: http://www.mydomain.com";; $request = "GET / HTTP/1.1\r\n". "Host: www.mydomain.com\r\n\r\n"; $ch = curl_init(); curl_setopt ($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_HEADER, 1); curl_setopt($ch, CURLOPT_TIMEOUT, 15); curl_setopt ($ch,CURLOPT_CUSTOMREQUEST , $request); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $reply = curl_exec($ch); curl_close ($ch); echo ''; echo $reply; ?> but using ngrep on a server of mine I can see this as the request: GET / HTTP/1.1. Host: www.mydomain.com. . / HTTP/1.1. Host: www.mydomain.com. Pragma: no-cache. Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*. may be this is what he's talking about when he says about the data libcurl will add? does anybody know under which circumstances may this fail?? thanks in advance, Juan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php