Re: [PHP] need real expert (geting outer files) *english/german*
OK... here are more details... my trying was to get the content from this url : http://www29.gmx.net/v4/register?FILE_POS_OLD=0&ADDR_CHECK=&t=&COMPANY=&TITL E=Herr&FIRSTNAME=Aaaa&MIDINITIAL=A&LASTNAME=Aaaa&STREET=Strandener Str. 1&ZIPCODE=51079&CITY=koeln&COUNTRYISO=DE&STATE=Nordrhein-Westfalen&LANGUAGES =,de&PHONE=&MOBILEPHONE=&FAX=&HOMEPAGE=&GENDER=M&BIRTHDAY=01&BIRTHMONTH=1&BI RTHYEAR=1901&MARRISTAT=S&HOUSEHOLDPERS=1&INCOME=0&EDUCATIONLEVEL=HSA&EMPLOYS TAT=SC&COMPUTEROWN=0&INTERNETUSE=Private&MPHONE=0 (one line!) into a variable. every other link succeed, but NOT this one. I've tried to do that with fopen and fsockopen. may be, i've made something wrong... I HOPE, u know an answer, how to do that... and please test it out, what you mean, and if it doesnt work, report anyway your tryings. ;) thanks! Tribun (Patrick Lehnen) PS: I've tried to solve this problem the hole day... I would like to, but I cant believe, that someone knows the right solution lets hope ;) "Richard Lynch" <[EMAIL PROTECTED]> schrieb im Newsbeitrag 00a801c12603$0ccb6c20$6401a8c0@Lynchux100">news:00a801c12603$0ccb6c20$6401a8c0@Lynchux100... > Subject: [PHP] need real expert (geting outer files) *english/german* > > > > the problem is, that this is very good restricted by serverside. > > If you've worked around that, you're probably now seeing something silly in > your fread() code... > > > But now I already get the file, and no more the error-message, > > but the problem is, that the file will not completly load. > > > > this means, I receive the file, but only the first 4188 bytes from > > 11988 bytes. > > You'd have to show us your source code for how you're dynamically > downloading only half the file. > > We can't just guess at what you've done to make it stop... > > It's extremely unliked for the server to decide halfway through a file > download that you were not a valid user and to quit sending you stuff... > > -- > WARNING [EMAIL PROTECTED] address is an endangered species -- Use > [EMAIL PROTECTED] > Wanna help me out? Like Music? Buy a CD: http://l-i-e.com/artists.htm > Volunteer a little time: http://chatmusic.com/volunteer.htm > > -- 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] to set file tye at apache module using htaccess
In response to Maxim and Rasmus, I got it work out now. Many thanks for this open source code community :-) Jack [EMAIL PROTECTED] "Love your enemies, it will drive them nuts" - Original Message - From: Maxim Maletsky <[EMAIL PROTECTED]> To: 'Jack' <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Thursday, August 16, 2001 2:01 AM Subject: RE: [PHP] to set file tye at apache module using htaccess > Yes, you can. > > Maxim Maletsky > > > -Original Message- > From: Jack [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 17, 2001 3:33 AM > Cc: [EMAIL PROTECTED] > Subject: Re: [PHP] to set file tye at apache module using htaccess > > > In response to Rasmus again, please bare with me a sec, where can I find the > file https.conf? I am only able to log in to server viw ftp at this stage, > so I am not sure if I will have access to that file yet. Alternatively, can > I do the same to .htaccess? > Jack > [EMAIL PROTECTED] > "Love your enemies, it will drive them nuts" > - Original Message - > From: Rasmus Lerdorf <[EMAIL PROTECTED]> > To: Jack <[EMAIL PROTECTED]> > Cc: <[EMAIL PROTECTED]> > Sent: Thursday, August 16, 2001 1:34 AM > Subject: Re: [PHP] to set file tye at apache module using htaccess > > > > > In response to Rasmus, I need to make this for all html files under a > > > domain, not just one file. Is there anyway to do this? > > > > Sure, in your httpd.conf file look for your block for the > > dmain and add: > > > > AddType application/x-httpd-php .html > > > > -Rasmus > > > > > > -- > > 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] Eval error
Felipe Coury wrote: > > Hi, > > I am a beginner in PHP and I am trying to do the following: I have a form in > a page that has 3 fields: email_1, email_2 and email_3. I am trying to send > e-mail to those people, if the fields are filled. Relevant part of code: > > for ($i = 1; $i <= 6; $i++) { > $eval = '\$email = \$email_' + $i + ';'; > eval( $eval ); > echo $email; > } > ?> > > The code complains about an error in line eval( $eval );: > > Parse error: parse error in > /home/httpd/htdocs/hthcombr/cgi-local/envia.php(19) : eval()'d code on line > 1 > > Can anyone please help me? > Use arrays, it's much easier. Set name of fields like this: email[0], email[1] and email[2]. Now after submitting the form you have array $email. And for-loop will be: Hope this helps. -- Pavel a.k.a. Papi -- 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] could i get a clue?
Robert V. Zwink wrote: > This particular application is designed to assist someone working on data > entry, and is currently in production. She inputs 100's of mail-in reply > cards into a database using a php webpage. The first field of the form is > for the email address listed on the reply card. If the email address is > already in the database, the person doing data entry will see an image of a > red light, if the email address is not in the database the person doing data > entry will see an image of a green light. Kind of weird, true, but exactly > what she wanted. Why should the person doing data entry have to type in > email address, mailing address, first name, last name, etc. just to get an > error saying duplicate entry found? This way she can choose to replace the > record or just skip it depending on the results (red or green). The > changing image increases her productivty by decreasing time spent inputing > duplicate data. > > And also is one possible answer to the question, "How do I access php from > JavaScript". > > I fail to see how this is a "horrible construction". Solves a problem with > minimal input from user, quickly, and completely. How is this horrible? > Its a functional tool, that is used ever day with 0 complaints. > > Horrible? > Inigo: "You keep using that word. I do not think it means what you think it > means." Michael Geier wrote: > No it's not. > First one is changing the address of the current window. > Second one is a popup window leaving the first one intact. > > Just semantics. A question for the both a you: Did either one of you actually _READ_ my message completely? No. Michael... I said "same _KIND_OF_ construction". I didn't say it's exactly the same. Kind of you to tell me thing I already know, but it doesn't change anything. It still is the same _kind_of_ construction. Like I wrote before; you redirect someone to a different page. And whether you do that in the same window or in a window that pops up makes no change to that. The user still goes to a different page for the result of the referenced PHP-script. And Robert... Seems like a pretty cool application you got there and for what you're doing there, the images _are_ a good solution. You want the 'light' to switch from green to red depending on a db-query in a different PHP-script. And it does, without the user having to leave the page. Smart! But like a wrote before; if you're not using any images on your page, it's not a nice solution. Then one should put images on a page where he/she doesn't want any images. And, like I wrote, then you get the Sitestat/Nedstat kind of constructions where you have to put a transparent image from 1x1 pixel on the page. That's not the way to do it. And why wouldn't I know what horrible means? Because I keep using that word? Wow... then you must have absolutely no clue of what words like 'is' and 'the' mean. Yes, I know... this doesn't make sense... Neither does your remark (...) -- * R&zE: -- -- Renze Munnik -- DataLink BV -- -- E: [EMAIL PROTECTED] -- W: +31 23 5326162 -- F: +31 23 5322144 -- M: +31 6 21811143 -- H: +31 23 5516190 -- -- Stationsplein 82 -- 2011 LM HAARLEM -- -- http://www.datalink.nl -- -- 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] .htaccess username
...hmmm, I would guess there is a way, but I dont know why... Can I read out the active username, which has just logged in through a .htaccess authentication??? Like the access data.. user: patrick pass: linux can PHP reads out the usersname "patrick" ?? (and if ,... how? ;) 10x 4 U'r time. Patrick -- 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] .htaccess username
Tribun wrote: > > ...hmmm, I would guess there is a way, but I dont know why... > > Can I read out the active username, which has just logged in through a > .htaccess authentication??? > > Like the access data.. > user: patrick > pass: linux > > can PHP reads out the usersname "patrick" ?? > > (and if ,... how? ;) > $PHP_AUTH_USER and $PHP_AUTH_PW. -- Pavel a.k.a. Papi -- 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] Addtype command in htaccess
Jack wrote: > > Hi people > this may be off this list a bit, But I want to make the apache webserver believe >that a "html" file is my server is actually a "php4" file, Is this syntax correct to >add in the .htaccess file? > > AddType application/x-httpd-php4 .html Just remove the '4' from this line and it's ok. -- Pavel a.k.a. Papi -- 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] Fussy logic...
Moin! Has anybody already thought about the problematic conditional on adding an automatic "BACK" Link? It seems to be very easy... just Link to basename($HTTP_REFERER); BUT if you CLICK on this Link, and come to a prior site, the BACK-Link THERE appears NOT to the PAGE, witch was prior this, but is linked to the Site you come from... so the link should better be called "FORWARD". Do U C the problem??? ;) Has someone an idea to solve it? Sincerely yours, Patrick Lehnen (alias: Tribun) -- 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] .htaccess username
Pavel Jartsev wrote: > Tribun wrote: > >>...hmmm, I would guess there is a way, but I dont know why... >> >>Can I read out the active username, which has just logged in through a >>.htaccess authentication??? >> >>Like the access data.. >>user: patrick >>pass: linux >> >>can PHP reads out the usersname "patrick" ?? >> >>(and if ,... how? ;) >> >> > > $PHP_AUTH_USER and $PHP_AUTH_PW. > > It's also possible to use $REMOTE_USER. I don't know of any $REMOTE_PASS, so the suggestion above it good ;) -- Stig-Ørjan Smelror Systemutvikler Linux Communications AS Sandakerveien 48b Box 1801 - Vika N-0123 Oslo, Norway tel. +47 22 09 28 80 fax. +47 22 09 28 81 http://www.lincom.no/ -- 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] Creating a javascript array from database data
I'm not sure if this is the problem but it is an important point. print "\"$text\""; does not output anything to screen, as with all prints and echos it outputs it to html (in this case within a js function definition). Try viewing the source produced. Tim -- From: Neil Freeman [SMTP:[EMAIL PROTECTED]] Sent: 15 August 2001 18:10 To: Sheridan Saint-Michel Cc: php-general Subject: Re: [PHP] Creating a javascript array from database data Thanks a lot for your help Sheridan, This now appears to work ok :) but if I remove the: print "\"$text\""; line (as it is not required), I receive errors complaining about a syntax error (related to what?) and that 'text' is undefined. As this line simply outputs the value to screen why should this cause a problem if it is removed? Or could it be some other problem? Neil PS: Here is my updated code: -- Menus test 0) { echo "\n"; echo "text = new Array("; while ($i < $number) { $text = mysql_result($result, $i, "name"); $i++; if ($i < $number) print ","; else print ")\n"; } echo "\n"; } mysql_free_result($result); mysql_close(); ?> -- Sheridan Saint-Michel wrote: > *** > This message was virus checked with: SAVI 3.48 > last updated 14th August 2001 > *** > > The thing to ALWAYS remember when working with both PHP and > JavaScript is that PHP is Server-Side and JavaScript is Client-Side. > > What this mean is practical terms is that when going from JavaScript > to PHP you have to submit or redirect back to the server... and when > going from PHP to JavaScript (Like you are trying to do here) you > have to make sure your PHP outputs JavaScript. > > So instead of printing $text you need to actually print the JavaScript... > > So in your case change the middle of your script to something like: > > $number = mysql_numrows($result); > > $i = 0; > > if ($number == 0) > print "Error - No records found"; > else > { > echo "\n"; > echo "text = new Array("; > while ($i < $number) > { > $text = mysql_result($result, $i, "name"); > print "\"$text\""; > $i++; > if ($i < $number) > print ","; > else > print ")\n"; >} > echo "\n"; > } > > } > > Note: This is my quick *untested* fix done by modifying > your code as little as possible. I would suggest you use > mysql_fetch_row and use your loop to parse it rather than > making several calls to mysql_result (especially if you are > ever going to have more than a few entries in the DB). > > Sheridan Saint-Michel > Website Administrator > FoxJet, an ITW Company > www.foxjet.com > > - Original Message - > From: Neil Freeman <[EMAIL PROTECTED]> > To: PHP General <[EMAIL PROTECTED]> > Sent: Wednesday, August 15, 2001 11:16 AM > Subject: [PHP] Creating a javascript array from database data > > > Hi there, > > > > Well after a few hours roaming around various websites I am at a loss. > > Here is what I am trying to do: > > > > 1) Access a MySQL database which contains 1 table > > 2) Read the records from this table > > 3) Store the values returned from this table into javascript array > > elements, ie, if I get the values "dog", "cat" and "cow" back I want > > these stored in an array as such: > > myArray[0] = valueReturned1 > > myArray[1] = valueReturned2 > > myArray[2] = valueReturned3 > > > > You get the idea. > > > > Problem being that I cannot work out how to implement the javascript > > section of this. At the moment my php script writes the values returned > > from the database to screen but I require these to be stored in a > > javascript array. Please can someone help me before I go mad :) > > > > Here is my current .php script: > > > > -- > > > > > > Menus test
Re: [PHP] Creating a javascript array from database data (Off-List)
Thanks for the clarification Sheridan - I think it must have been end of day madness on my part :) I see what's going on now with the 'print' line. Cheers, Neil Sheridan Saint-Michel wrote: > *** > This message was virus checked with: SAVI 3.48 > last updated 14th August 2001 > *** > > Think in terms of output... The JavaScript is literally going to > try and run the output of the PHP (It doesn't even know PHP > exists). PHP is outputting the source code for the HTML and > JavaScript. So what you are trying to do is get PHP to take > dog,cat,cow from MySQL and output: > > > text = new Array("dog","cat","cow") > > > This block of code does exactly that, with the print"\"$text\""; > filling in dog cat and cow. I've added comments so you can > see how each line produces the above (I am using C-Style > comments as the // gets mucked up in e-mail) > > The parts in [] are comments within comments to show flow > control and are not output. > > else > { > /* */ > echo "