Re: [PHP] how to make multiple website on one host
jeffry s wrote: i am wondering whether this can be done. i know it can. is it possible to make one website with the ability to host multiple website. it is something like website generator. eg: www.shopify.org let say for example i have a website www.example.org. i can point a domain name (www.example1.org) to the server where www.example.org hosted, and when user visit www.example1.org, it execute the same scripts as www.example.org with with different themes and website configuration. anyone have the idea? thanks Jeffry, Yes, I built a site 7 years ago that could do this. The primary site was like and administration/management console. Then, in the background, there were a number of scripts that would run the secondary website. All the secondary websites used the same source directory. They referred to the $_SERVER['HTTP_HOST'] setting to figure out which host name they were coming from / going to. The site is still running today. Mind you that it needs some major overhauling, but it is still used by about 400 domains clients. Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] flash with PHP
Hi, i would like to have a flash menu in my PHP website. this is no problem. My problem is how to exchange data between PHP andFlash (in both direction). i found a lot of posts on this theme, but nothing with really works under ActionScript 3 and PHP. does anyone already solved such topic ? thx. -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
[PHP] php competion
come on people try you skills at http://www.rhwebhosting.com/comp/index.php
Re: [PHP] Jacco van Hooren
Nathan Rixham wrote: wish he'd turn that auto responder off.. *sigh* - he's now top of my contacts in gtalk.. That is his way of getting to the top of next weeks PostTrack Report from Dan:) Jim -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] PHP5 and XSLTProcessor: disable validation
Hi, i'm currently learning php by implementing a blog system. This uses xsl for transformation to (x)html. It is working so far, but it is slow. As far as i can see the XSLTProcessor is doing a validation. Doing the same transformation with xsltproc (the command line tool for libxslt) takes about the same time. Adding the parameter --novalid to xsltproc speeds up things dramatically. Is there any possibility/option/parameter/whatever to stop XSLTProcessor validation? I've found nothing in the documentation. I hope i'm not wrong here. I'm new to php as well as to this list :) regards Siegfried Gipp -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: Server to client file transfer with authorization: file always corrupt
On Sat, 02 Feb 2008 23:08:43 -, Nathan Rixham <[EMAIL PROTECTED]> wrote: szalinski wrote: Hi I am having trouble with a file transfer script, as you can see, I am trying trying to keep the code as simple as possible. But everytime I download a file with it, it is corrupt. For example, when I download a small .rar file, just to test, it is always corrupt ('Unexpected end of archive'). I also cleared my browser cache just to be sure, but same problem. I just can't get my head around why it wouldn't be working as it is... A couple of questions: Have I got too many header requests? Do I need to worry about output buffering, which is possibly corrupting the file output (if so, please tell me what to do!)? Is there an easier way to get returned response header and get a redirected link, instead of finding and cutting strings? Is there maybe something wrong with the structure or order of the header requests, and/or returned headers etc? Here is what I have so far: 0) { $url = @parse_url($link); $fp = @fsockopen($url['host'], 80, $errno, $errstr); if (!$fp) { $errormsg = "Error: $errstr, please try again later."; echo $errormsg; exit; } $vars = "dl.start=PREMIUM&uri={$url['path']}&directstart=1"; $out = "POST {$url['path']} HTTP/1.1\r\n"; $out .= "Host: {$url['host']}\r\n"; $out .= "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n"; $out .= "Authorization: Basic ".base64_encode("{$rslogin}:{$rspass}")."\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Content-Length: ".strlen($vars)."\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); fwrite($fp, $out.$vars); while (!feof($fp)) { $string .= fgets($fp, 256); } //Tell us what data is returned //print($string); @fclose($fp); if (stristr($string, "Location:")) { $redirect = trim(cut_str($string, "Location:", "\n")); $full_link = addslashes(trim($redirect)); } //print($string); //print("".$full_link.""); if ($full_link) { //Get info about the file we want to download: $furl = parse_url($full_link); $fvars = "dl.start=PREMIUM&uri={$furl['path']}&directstart=1"; $head = "Host: {$furl['host']}\r\n"; $head .= "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n"; $head .= "Authorization: Basic ".base64_encode("{$rslogin}:{$rspass}")."\r\n"; $head .= "Content-Type: application/x-www-form-urlencoded\r\n"; $head .= "Content-Length: ".strlen($fvars)."\r\n"; $head .= "Connection: close\r\n\r\n"; $fp = @fsockopen($furl['host'], 80, $errno, $errstr); if (!$fp) { echo "The script says $errstr, please try again later."; exit; } fwrite($fp, "POST {$furl['path']} HTTP/1.1\r\n"); fwrite($fp, $head.$fvars); while (!feof($fp)) { //Keep reading the info until we get the filename and size from the returned Header - is there no easy way //of doing this? I also don't like the way I have to 'find' the redirected link (above).?? $tmp .= fgets($fp, 256); $d = explode("\r\n\r\n", $tmp); // I tried changing this to if ($d), { etc.., (instead of $d[1]) and the download of the rar file *wasn't* corrupt, it just had a filetype of x-rar-compressed instead of //application/octet-stream, and the filesize was 'unknown' - now this is just confusing me...! So i think (and guess) the problem of the file corruption is here, //because it must add some data to the filestream which corrupts it. Darn. if($d[1]) { preg_match("#filename=(.+?)\n#", $tmp, $fname); preg_match("#Content-Length: (.+?)\n#", $tmp, $fsize); $h['filename'] = $fname[1] != "" ? $fname[1] : basename($furl['path']); $h['fsize'] = $fsize[1]; break; } } @fclose($fp); $filename = $h['filename']; $fsize = $h['fsize']; //Now automatically download the file: @header("Cache-Control:"); @header("Cache-Control: public"); @header("Content-Type: application/octet-stream"); @header("Content-Disposition: attachment; filename=".$filename); @header("Accept-Ranges: bytes"); if(isset($_SERVER['HTTP_RANGE'])) { list($a, $range)=explode("=",$_SERVER['HTTP_RANGE']); $range = str_replace("-", "", $range); $new_length = $fsize - $range; @header("HTTP/1.1 206 Partial Content"); @header("Content-Length: $
Re: [PHP] php competion
doc wrote: come on people try you skills at http://www.rhwebhosting.com/comp/index.php Are these people joking ;o) This sounds more like "hey, give us 4-5 great products for free, and we may award you" ;o) I thought competitions usually give some more or less "abstract" tasks, where people can show how well they master the language, like - "do this with less than 15 lines of code". But "redesign our web site",... it's funny ;o) Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flash with PHP
Alain Roger wrote: Hi, i would like to have a flash menu in my PHP website. this is no problem. My problem is how to exchange data between PHP andFlash (in both direction). i found a lot of posts on this theme, but nothing with really works under ActionScript 3 and PHP. does anyone already solved such topic ? thx. I researched this some time ago... You can pass parameters to flash movie in ONE of the parameters it accepts (don't remember which one, but you can find out). This means, you can't pass each parameter separately, but you have to pack them, somehow (not sure what separators are allowed) and then unpack them inside the movie. As to passing parameters from the flash movie to the php - basically if people can click inside the movie, you can perhaps send GET or POST requests back to the server, which your php can interpret. Iv -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php competion
On Sun, 2008-02-03 at 20:10 +1100, doc wrote: > come on people try you skills at > > http://www.rhwebhosting.com/comp/index.php Reworded as: Redesign our complete web presence and give us a couple of apps that we can flog to our clients, and we *may* give you a consolation prize. Yeah right. --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Timeout while waiting for a server->client transfer to start (large files)
Thanks I have already another post dealing with this issue. (check newsgroup for Server to client file transfer always corrupt). I had figured out the problem that was corrupting the file, it is the response headers that are being added to the file when it is downloaded, and i don't know how to trim them. I am using a different trim method i 'borrowed' from another script (where it seems to work perfectly!), and I just can't understand why it won't work for me, unless as u say, there are other errors being output, but I have looked at the text file and I don't see anything other than the headers there. When I use the trim script to remove them, it also seems to remove part of the start and end of the text file. I think the most annoying aspect of whole thing is why it is so difficult to find a solution to this problem, i'm sure other people must have come across this problem? thanks again :) On Sun, 03 Feb 2008 16:28:34 -, Richard Lynch <[EMAIL PROTECTED]> wrote: You can use filesize() to get the file size... http://php.net/filesize If that's not going to work because you are stripping out part of the file, or something, Use fgets to get the header info, and then use fseek to reset the file pointer to the beginning: http://php.net/fseek You can then read as much or as little as you like with fread. As far as the corrupt files go, compare what you got with the download and the original in a text editor or a hex editor to see what happened. You might have some PHP warnings or notices at the front of the file, or at the end, messing the file contents up. On Thu, January 31, 2008 12:11 pm, szalinski wrote: On Thu, 31 Jan 2008 00:02:55 -, Richard Lynch <[EMAIL PROTECTED]> wrote: Hello Richard Well, thank you for pointing that out to me! I was actually trying to read it into RAM, but that was a silly mistake. But now I have the problem that, even though you are correct, the problem seems to still remain, in the sense that I actually *need* to read the start of the file just to get the header info (so i can retrieve the Content-Length, and the filename). Since I tried your method above, I thought I had got the script to finally work - which it seemed to - but every file I download with it is corrupt. I tried downloading a WinRAR file, and I get 'unexpected end of archive'. :( I know for a fact that the archive itself is NOT corrupt, because I tried it with various different files and all of them ended up corrupt! I found some info on the net about fread() and fgets(), and it seems that fgets() only reads one line of data up to 1024 bytes, or in my case, 64 bytes. This is what I want to happen, because I need the 'reading' to abort/break when I have read the required info from the header...I wish (and hope!) there was an easier way to get this info other than searching for it. :| Now I am truly vexed because the files are all corrupt when downloaded, because I can't see anything wrong with the code. I have added a few comments, so you can see what I think is the problematic area. By the way, many thanks for your enthusiastic help so far! - I hope you don't take this email to mean I will be mailing you frequently, believe me I know you must be busy, and I only mailed you as a last resort! Thanks again! 0) { $url = @parse_url($link); $fp = @fsockopen($url['host'], 80, $errno, $errstr); if (!$fp) { $errormsg = "Error: $errstr, please try again later."; echo $errormsg; exit; } $vars = "dl.start=PREMIUM&uri={$url['path']}&directstart=1"; $out = "POST {$url['path']} HTTP/1.1\r\n"; $out .= "Host: {$url['host']}\r\n"; $out .= "User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1)\r\n"; $out .= "Authorization: Basic ".base64_encode("{$rslogin}:{$rspass}")."\r\n"; $out .= "Content-Type: application/x-www-form-urlencoded\r\n"; $out .= "Content-Length: ".strlen($vars)."\r\n"; $out .= "Connection: Close\r\n\r\n"; fwrite($fp, $out); fwrite($fp, $out.$vars); unset($string); while (!feof($fp)) { $string.= fgets($fp, 64); } //Tell us what data is returned //print($string); @fclose($fp); if (stristr($string, "Location:")) { $redirect = trim(cut_str($string, "Location:", "\n")); $full_link = $redirect; } //print($string); //print("".$full_link.""); if ($full_link) { // Get info about the file
Re: [PHP] php competion
On Sun, 2008-02-03 at 18:15 +0200, Paul Scott wrote: > On Sun, 2008-02-03 at 20:10 +1100, doc wrote: > > come on people try you skills at > > > > http://www.rhwebhosting.com/comp/index.php > > Reworded as: > > Redesign our complete web presence and give us a couple of apps that we can > flog to our clients, > and we *may* give you a consolation prize. So not worth the time and effort. Any person capable of doing the code conversion (to AT LEAST C, Python, and Perl nonetheless) is smart enough to know the potential payoff is worse than flipping burger and McGeneric's. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Resetting a session variable
What is the command to reset a session variable --- essentially deleting all of the values it contains? Ron -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Resetting a session variable
Ron Piggott wrote: > What is the command to reset a session variable --- essentially > deleting all of the values it contains? Ron > I haven't checked, but how about unset() ? /Per Jessen, Zürich -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flash with PHP
On Feb 3, 2008, at 12:23 AM, "Alain Roger" <[EMAIL PROTECTED]> wrote: > Hi, > > i would like to have a flash menu in my PHP website. > this is no problem. > > My problem is how to exchange data between PHP andFlash (in both > direction). > i found a lot of posts on this theme, but nothing with really works > under > ActionScript 3 and PHP. > > does anyone already solved such topic ? > > thx. > > -- > Alain > > Windows XP SP2 > PostgreSQL 8.2.4 / MS SQL server 2005 > Apache 2.2.4 > PHP 5.2.4 > C# 2005-2008 var loadvars = new LoadVars(); http://www.google.com/search?q=loadvars -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Jacco van Hooren
On Feb 3, 2008 1:51 AM, Jim Lucas <[EMAIL PROTECTED]> wrote: > Nathan Rixham wrote: > > wish he'd turn that auto responder off.. *sigh* - he's now top of my > > contacts in gtalk.. > > > > That is his way of getting to the top of next weeks PostTrack Report > from Dan:) > > Jim > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > You could set up Gmail's filters. -- -Casey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Resetting a session variable
On Feb 3, 2008 10:25 AM, Per Jessen <[EMAIL PROTECTED]> wrote: > Ron Piggott wrote: > > > What is the command to reset a session variable --- essentially > > deleting all of the values it contains? Ron > > > > I haven't checked, but how about unset() ? > > > /Per Jessen, Zürich > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > unset($_SESSION); or $_SESSION = array(); -- -Casey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flash with PHP
this is right under actionscript 2.0... i'm working under actionscript 3.0 :-) On Feb 3, 2008 7:28 PM, Casey <[EMAIL PROTECTED]> wrote: > On Feb 3, 2008, at 12:23 AM, "Alain Roger" <[EMAIL PROTECTED]> wrote: > > > Hi, > > > > i would like to have a flash menu in my PHP website. > > this is no problem. > > > > My problem is how to exchange data between PHP andFlash (in both > > direction). > > i found a lot of posts on this theme, but nothing with really works > > under > > ActionScript 3 and PHP. > > > > does anyone already solved such topic ? > > > > thx. > > > > -- > > Alain > > > > Windows XP SP2 > > PostgreSQL 8.2.4 / MS SQL server 2005 > > Apache 2.2.4 > > PHP 5.2.4 > > C# 2005-2008 > > var loadvars = new LoadVars(); > > http://www.google.com/search?q=loadvars > -- Alain Windows XP SP2 PostgreSQL 8.2.4 / MS SQL server 2005 Apache 2.2.4 PHP 5.2.4 C# 2005-2008
RE: [PHP] Resetting a session variable
unset($_SESSION['var_name']); bastien > From: [EMAIL PROTECTED] > To: php-general@lists.php.net > Date: Sun, 3 Feb 2008 13:14:47 -0500 > Subject: [PHP] Resetting a session variable > > What is the command to reset a session variable --- essentially deleting > all of the values it contains? Ron > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > _ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Resetting a session variable
Resetting all session variables or one of those session vars ? If you need to reset all then use *session_destroy() *function. Hope it helps.. Regards, Feris http://top-10.bigspacehosting.com On Feb 4, 2008 1:14 AM, Ron Piggott <[EMAIL PROTECTED]> wrote: > What is the command to reset a session variable --- essentially deleting > all of the values it contains? Ron > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >
Re: [PHP] flash with PHP
On Feb 3, 2008 10:44 AM, Alain Roger <[EMAIL PROTECTED]> wrote: > this is right under actionscript 2.0... i'm working under actionscript 3.0 > :-) > > > > On Feb 3, 2008 7:28 PM, Casey <[EMAIL PROTECTED]> wrote: > > > On Feb 3, 2008, at 12:23 AM, "Alain Roger" <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > > > > i would like to have a flash menu in my PHP website. > > > this is no problem. > > > > > > My problem is how to exchange data between PHP andFlash (in both > > > direction). > > > i found a lot of posts on this theme, but nothing with really works > > > under > > > ActionScript 3 and PHP. > > > > > > does anyone already solved such topic ? > > > > > > thx. > > > > > > -- > > > Alain > > > > > > Windows XP SP2 > > > PostgreSQL 8.2.4 / MS SQL server 2005 > > > Apache 2.2.4 > > > PHP 5.2.4 > > > C# 2005-2008 > > > > var loadvars = new LoadVars(); > > > > http://www.google.com/search?q=loadvars > > > > > > -- > > > Alain > > Windows XP SP2 > PostgreSQL 8.2.4 / MS SQL server 2005 > Apache 2.2.4 > PHP 5.2.4 > C# 2005-2008 Does this work? http://www.peterelst.com/blog/2007/11/28/actionscript-30-wheres-my-loadvars/ -- -Casey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make multiple website on one host
Yes you can. Just mirror the additional domains and in your PHP app check the $_SERVER["HTTP_HOST"] variable. Hope this helps ! Regards, Feris http://top-10.bigspacehosting.com On Feb 3, 2008 2:20 PM, jeffry s <[EMAIL PROTECTED]> wrote: > i am wondering whether this can be done. i know it can. > is it possible to make one website with the ability to host multiple > website. > it is something like website generator. eg: www.shopify.org > > let say for example i have a website www.example.org. > i can point a domain name (www.example1.org) to the server where > www.example.org hosted, > and when user visit www.example1.org, it execute the same scripts as > www.example.org with > with different themes and website configuration. > > anyone have the idea? > > thanks >
Re: [PHP] Resetting a session variable
unset($_SESSION); or $_SESSION = array(); This reset all of the session variables. To reset only one, try this: -- Richard Heyes http://www.websupportsolutions.co.uk Knowledge Base and Helpdesk software for £299 hosted for you - no installation, no maintenance, new features automatic and free -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how dod you get to do multiple mysql queries concurrently?
Paul Scott schreef: Did anyone actually get this mail? it came through :-) More concrete example? What would you like to see? the column spec. what kind of geomtery column is it? and are you using it as a primary key? or some else ... if so what kind of stuff are you storing in there? also in what way are you using it that gives you such a speed boost with queries? I read the mysql docs, I understand the principles but I'm having a hard time figuring out how to apply in practice in terms of making use of the performance gains you mentione ... specifically in a web environment where heavy queries are often along the lines of paginated data combined with user defined filters (e.g. a product list sorted by price, etc and filter on type/category/keyword/etc) sorry if I'm sounding like a idiot :-) I suspect that some of my mail is getting dropped :( --Paul On Fri, 2008-02-01 at 06:33 +0200, Paul Scott wrote: On Fri, 2008-02-01 at 03:40 +0100, Jochem Maas wrote: I for one would really like to see a concrete example of this kind of use of geometry columns and spacial indexes as an alternative to the stand integer based primary keys. On one of my local postGIS tables: CREATE INDEX k1 ON kanagawa USING gist (the_geom); A gist index is a GEOS based spatial index. You will need GEOS to create one. When loading spatial data, your geometry column looks like so: 01050001000102000C0011ECE564CF7561404A8999CCDABC4140E5C0981ACE75614012901CD641BD4140603C8386BE756140E525611B40BD41405BF216D3BD756140151DC9E53FBD414054DC1A4DBD756140760B997A3FBD414012219BD1BC756140D20823E33EBD41407AB2884EBC7561400F2110243EBD41404571B4D0BB756140CC0C6A213DBD4140F707192ABB7561405DF2A1803CBD4140F0F11CA4BA756140C3D1B7413CBD4140E89CB2ADB97561406F046D233CBD414017D4B7CCA97561406D47AD7F39BD4140 Which is WKB (Well Known Binary) data or WKT (Well Known Text) data. The gist index simply indexes this as opposed to the regular gid (which you still use btree indexes on anyways) --Paul All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make multiple website on one host
On Feb 4, 2008 3:33 AM, Feris Thia C. <[EMAIL PROTECTED]> wrote: > Yes you can. > > Just mirror the additional domains and in your PHP app check the > $_SERVER["HTTP_HOST"] variable. > > Hope this helps ! > > Regards, > > Feris > http://top-10.bigspacehosting.com > > > On Feb 3, 2008 2:20 PM, jeffry s <[EMAIL PROTECTED]> wrote: > > > i am wondering whether this can be done. i know it can. > > is it possible to make one website with the ability to host multiple > > website. > > it is something like website generator. eg: www.shopify.org > > > > let say for example i have a website www.example.org. > > i can point a domain name (www.example1.org) to the server where > > www.example.org hosted, > > and when user visit www.example1.org, it execute the same scripts as > > www.example.org with > > with different themes and website configuration. > > > > anyone have the idea? > > > > thanks > > > great help, thanks you all.. =)
[PHP] about preg_replace, please help !
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Resetting a session variable
Hi there are 2 functions session_unset('Key'); session_destroy(); please find them in the manual. i think they are the 2 used for setting and usetting the session. On Feb 4, 2008 1:14 AM, Feris Thia C. <[EMAIL PROTECTED]> wrote: > Resetting all session variables or one of those session vars ? > > If you need to reset all then use *session_destroy() *function. > > Hope it helps.. > > Regards, > > Feris > http://top-10.bigspacehosting.com > > On Feb 4, 2008 1:14 AM, Ron Piggott <[EMAIL PROTECTED]> wrote: > > > What is the command to reset a session variable --- essentially deleting > > all of the values it contains? Ron > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > > > -- Have A pleasant Day Chetan. D. Rane Location: India Contact: +91-9986057255 other ID: [EMAIL PROTECTED] [EMAIL PROTECTED]
Re: [PHP] how to make multiple website on one host
On Sun, February 3, 2008 1:20 am, jeffry s wrote: > i am wondering whether this can be done. i know it can. > is it possible to make one website with the ability to host multiple > website. > it is something like website generator. eg: www.shopify.org > > let say for example i have a website www.example.org. > i can point a domain name (www.example1.org) to the server where > www.example.org hosted, > and when user visit www.example1.org, it execute the same scripts as > www.example.org with > with different themes and website configuration. switch($_SERVER['HTTP_HOST'])){ case 'example1.org': load('example1'); break; case 'example.org': load('example'); break; } You should also consider playing games with Apache mod_rewrite -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] " using the mail() command
I would think you'd want all that MIME stuff in the headers... But I don't really know. If you want a quote in the HTML part, use &qout; In the plain-text, I would assume \" would embed a quote... On Sat, February 2, 2008 6:26 pm, Ron Piggott wrote: > When I use the mail($email, $subject, $message, $headers); command I > assign the value of $message as follows: > > $boundary = md5(uniqid(time())); > > $message = " > > --$boundary > Content-Type: text/plain; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > blah > > --$boundary > Content-Type: text/html; charset=iso-8859-1 > Content-Transfer-Encoding: 8bit > > Blah > > --$boundary-- > "; > > I would like to be able to include a " in my message body --- both the > HTML and text version --- how can I accomplish this? (I use a " to > assign the value of $subject). I have been able to get \" to work --- > but \" shows when reading the e-mail, not just the ". > > Thanks for your help > > Ron > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] about preg_replace, please help !
On Feb 3, 2008, at 5:00 PM, "LKSunny" <[EMAIL PROTECTED]> wrote: -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php list(, $result) = explode("\r\n\r\n", $string, 2); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Redirecting STDERR to a file?
On Fri, February 1, 2008 10:58 pm, js wrote: > Hi, > > I was trying to write a script in PHP that takes a program name > as an argument and invoke it as a daemon. > PHP provides fork(pcntl_fork), setsid(posix_setsid) and umask, > so it was easy. > However, I couldn't find a way to redirect STDERR a file. > I like to have the daemon write its log to its own logfile, like > apache and mysql do. > > So is there any way to accomplish that? > Any pointers, suggestions would be greatly appreciated. http://php.net/set_error_handler You can catch (almost) all the errors and send them wherever you want. Or maybe you just want to write this as a shell script instead of using PHP in the first place. :-) -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php competion
On Sun, February 3, 2008 11:51 am, Robert Cummings wrote: > > On Sun, 2008-02-03 at 18:15 +0200, Paul Scott wrote: >> On Sun, 2008-02-03 at 20:10 +1100, doc wrote: >> > come on people try you skills at >> > >> > http://www.rhwebhosting.com/comp/index.php >> >> Reworded as: >> >> Redesign our complete web presence and give us a couple of apps that >> we can flog to our clients, >> and we *may* give you a consolation prize. > > So not worth the time and effort. Any person capable of doing the code > conversion (to AT LEAST C, Python, and Perl nonetheless) is smart > enough > to know the potential payoff is worse than flipping burger and > McGeneric's. Actually, the specification for the real estate listing thingie looked pretty trivial... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Location in php's source for ini-values
On Sat, February 2, 2008 5:09 am, ehl lhe wrote: > > hello, > > > I'd like to know where PHP finally sets the php.ini-values in it's > sourcecode, e.g. max_execution_time, open_basedir, etc... > What I need is to set several static values which must not be editable > using php.ini, .htaccess, ini_set, or whatever - so I simply need to > set final values for several php.ini-settings by modifying the php > sourcecode... open_basedir can't be over-ridden in .htaccess or with ini_set. That would defeat its whole purpose. max_execution_time can be, but I *think* there might be something with php_admin_value that makes it not be over-ridable. I don't know where it is in the source, but I know you can try digging through the source here: http://lxr.php.net/ or here: http://cvs.php.net/ It's not going to be terribly tricky to find, as it's not in the extensions, and it's GOT to be in something pretty basic/fundamental, as well as in the first chunk of code that executes... -- Some people have a "gift" link here. Know what I want? I want you to buy a CD from some indie artist. http://cdbaby.com/from/lynch Yeah, I get a buck. So? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Resetting a session variable
On Sun, 2008-02-03 at 13:14 -0500, Ron Piggott wrote: > What is the command to reset a session variable --- essentially deleting > all of the values it contains? Ron Assign the session to an empty array() and then use session_destroy() All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] flash with PHP
FlashKnowledge = 0; phpKnowledge = 1; I remember some time back finding a class for php and a class/unit/addon for flash that allowed communication between php file and flash files, just google for it Clive Alain Roger wrote: Hi, i would like to have a flash menu in my PHP website. this is no problem. My problem is how to exchange data between PHP andFlash (in both direction). i found a lot of posts on this theme, but nothing with really works under ActionScript 3 and PHP. does anyone already solved such topic ? thx. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] about preg_replace, please help !
On Feb 3, 2008 9:04 PM, LKSunny <[EMAIL PROTECTED]> wrote: > this i know. > but i need use preg_replace. > > any body can help me, thank you very much !! > > "Casey" <[EMAIL PROTECTED]> > ???:[EMAIL PROTECTED] > > > On Feb 3, 2008, at 5:00 PM, "LKSunny" <[EMAIL PROTECTED]> wrote: > > > >> >> $txt = << >> a > >> a > >> a > >> > >> > >> > >> > >> > >> eof; > >> > >> //i just want replace "start to first \r\n\r\n" > >> //how can i do ? > >> //i want out put > >> /* > >> > >> > >> > >> > >> */ > >> print preg_replace("What's is this ?", "", $txt); > >> > >> //Thank You !! > >> ?> > >> > >> -- > >> PHP General Mailing List (http://www.php.net/) > >> To unsubscribe, visit: http://www.php.net/unsub.php > >> > > > > list(, $result) = explode("\r\n\r\n", $string, 2); > > -- Why do you need preg_replace? -- -Casey -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] about preg_replace, please help !
this i know. but i need use preg_replace. any body can help me, thank you very much !! "Casey" <[EMAIL PROTECTED]> ???:[EMAIL PROTECTED] > On Feb 3, 2008, at 5:00 PM, "LKSunny" <[EMAIL PROTECTED]> wrote: > >> > $txt = <<> a >> a >> a >> >> >> >> >> >> eof; >> >> //i just want replace "start to first \r\n\r\n" >> //how can i do ? >> //i want out put >> /* >> >> >> >> >> */ >> print preg_replace("What's is this ?", "", $txt); >> >> //Thank You !! >> ?> >> >> -- >> PHP General Mailing List (http://www.php.net/) >> To unsubscribe, visit: http://www.php.net/unsub.php >> > > list(, $result) = explode("\r\n\r\n", $string, 2); -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] about preg_replace, please help !
On Sun, 2008-02-03 at 21:06 -0800, Casey wrote: > Why do you need preg_replace? > Else he fails a homework assignment? --Paul -- . | Chisimba PHP5 Framework - http://avoir.uwc.ac.za | :: All Email originating from UWC is covered by disclaimer http://www.uwc.ac.za/portal/public/portal_services/disclaimer.htm -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] php competion
On Sun, 2008-02-03 at 20:48 -0600, Richard Lynch wrote: > > On Sun, February 3, 2008 11:51 am, Robert Cummings wrote: > > > > On Sun, 2008-02-03 at 18:15 +0200, Paul Scott wrote: > >> On Sun, 2008-02-03 at 20:10 +1100, doc wrote: > >> > come on people try you skills at > >> > > >> > http://www.rhwebhosting.com/comp/index.php > >> > >> Reworded as: > >> > >> Redesign our complete web presence and give us a couple of apps that > >> we can flog to our clients, > >> and we *may* give you a consolation prize. > > > > So not worth the time and effort. Any person capable of doing the code > > conversion (to AT LEAST C, Python, and Perl nonetheless) is smart > > enough > > to know the potential payoff is worse than flipping burger and > > McGeneric's. > > Actually, the specification for the real estate listing thingie looked > pretty trivial... But then there's... "We would appreciate it if people would select a category appropriate to their skills and experience" So they'd rather you didn't pick that one Richard ;) I doubt there's a $10k and $5k prize for each category. Cheers, Rob. -- .. | InterJinn Application Framework - http://www.interjinn.com | :: | An application and templating framework for PHP. Boasting | | a powerful, scalable system for accessing system services | | such as forms, properties, sessions, and caches. InterJinn | | also provides an extremely flexible architecture for | | creating re-usable components quickly and easily. | `' -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to make multiple website on one host
can you tell me more about mod_rewrite? On Feb 4, 2008 10:52 AM, Richard Lynch <[EMAIL PROTECTED]> wrote: > > > On Sun, February 3, 2008 1:20 am, jeffry s wrote: > > i am wondering whether this can be done. i know it can. > > is it possible to make one website with the ability to host multiple > > website. > > it is something like website generator. eg: www.shopify.org > > > > let say for example i have a website www.example.org. > > i can point a domain name (www.example1.org) to the server where > > www.example.org hosted, > > and when user visit www.example1.org, it execute the same scripts as > > www.example.org with > > with different themes and website configuration. > > switch($_SERVER['HTTP_HOST'])){ > case 'example1.org': load('example1'); break; > case 'example.org': load('example'); break; > } > > You should also consider playing games with Apache mod_rewrite > > -- > Some people have a "gift" link here. > Know what I want? > I want you to buy a CD from some indie artist. > http://cdbaby.com/from/lynch > Yeah, I get a buck. So? > >