[PHP] Re: Flash-PHP Socket Connection
I am doing the same thing at the moment, I'm building a Flash/PHP/MySQL chat system capable of handling over 1000 users online at one time. GET and POST just doesn't cut it, so I began to explore other avenues, and XML Socket's seem like the best and only option. But I expect to burn the midnight oil on this one. Marc "Ben Ramsey" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I guess that's good enough reason for me. As far as connecting with > sockets, though: you should connect from Flash to the PHP file, not from > PHP to the Flash file, I think. And, in order to do that, you would > need to ask some people who specialize in Flash and ActionScript, so the > boards at Macromedia.com may be the best place to ask. > > Then again, I could be absolutely wrong. ;-) > > -Ben > > > Eric Bolikowski wrote: > > > Hey Ben > > > > I know it may sound nuts, but I really want to make a socket connection > > between a Flash and a PHP file. > > > > Normally I would simply read in a text file/read XML/send data with GET or > > POST, but I'm looking for a socket connections of following reasons: > > > > 1) I want a fast connection > > 2) I'm looking at this as a challenge, because it doesn't seem like anyone > > else has done this before > > > > Eric > > > > "Ben Ramsey" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > >>What I mean is: you shouldn't need to use sockets to read in a file from > >>Flash unless you're trying to do something more complicated, but from > >>the way it sounds, you just want to pull data from MySQL with a PHP > >>script and output it to Flash. The PHP script could just echo plain > >>text and Flash can read that in just fine without needing to connect via > >>a socket. > >>-Ben > >> > >>Ben Ramsey wrote: > >> > >> > >>>Flash has the ability to read in text files, so you could use PHP to > >>>output data in the correct format and use Flash to read the PHP script > >>>like it reads a text file. We did this in ASP once upon a time. > >>> > >>>Here's a tutorial about reading text files into Flash: > >>>http://www.virtual-fx.net/tutorials/html/loadtextfile.htm > >>> > >>>Also, from what I understand, Flash now has a great XML parser, so you > >>>could use PHP to generate XML and Flash could read in the XML as > >>>variables. You might want to look into that, but I think it's only > >>>available in the newest version. > >>> > >>>-Ben > >>> > >>> > >>>Eric Bolikowski wrote: > >>> > >>> > Hi everybody > > I'm working on a site that will be based on Flash, PHP and MySQL. PHP > will > work as a middleware for Flash and MySQL. > > My problem is communication between Flash and PHP. > I'm really out looking for using the socket functions in PHP and Flash > > > > to > > > make fast connection. > > I have googled for almost an hour now, and I can't seem to find any > interesting. The only info I find, is about sending data between Flash > and > PHP with HTTP GET or HTTP POST. > > So if anybody has some general information on this or a link to a > tutorial > on the subject, I would like to get those resources. > > Thanks a lot > > Eric -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] IRCG - php windows extension HELP!
I'm trying to install IRCG as an extension to my Apache 2 PHP server running on Windows XP. Trouble is IRCG for windows comes as a standalone package, that doesn't seem to load in as an extension to php declaired in php.ini. I've typed in all the extensions but i continue to get an error for each dll that the module can not be found. Has anyone installed IRCG as an extension for windows? Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SQL Hell
Hi all, Wondering if someone could help me with an sql statement MySQL version 4.0.18 I have three tables: 1. visitor_data (Visitor_ID, IP Address) 2. visit_data (Visit_ID, Visitor_ID) 3. page_data (Page_ID, Visit_ID, Visitor_ID, URI) If you look closely you can see the relationship in these tables and you might guess I'm tracking what a user is doing on this site. visitor_data obviously records only unique visitors, I'm collecting a few other things as well as what I've written, such as employing a cookie, tracking their current local time, etc to build an effective method of knowing who is coming back. visit_data records each visit to the site and references from the visitor_data.Visitor_ID. This is only done once a session. page_data records every move the user makes. I need to pull data out of these tables to make a graphical table displaying: Visitor ID, Entry Page, Exit Page and Session Duration. There will be one row per visit. So far I've made multiple statements pulling out all the data and using PHP to formulate the information. But I know there is a better way using mysql. Only thing is I haven't got the faintest idea how to do it in one query and keep overheads low. I start to get lost when I'm doing select statements within select statements. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: SQL Hell
> Alternatively, use a better database :) > Firebird has had Triggers and Stored Procedures from the start. Using > these with PHP gives the power needed to update cross references without > having to build complex PHP code. > http://www.firebirdsql.org/ I just downloaded and installed fire bird, looks interesting. But it's not for this current development. Perhaps later, not the project is 3/4 complete. Tell me how do you interface firebird with PHP? By the way, my problem with my statement is still lingering, so far I'm having to create a temporary table and then searching with that. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SQL help
Hi all here's my problem, I have two tables: 'user_data' and 'image_data' obviously user_data has all the user information and image_data has all the image information in image_data are the fields: Image_ID int(11), User_ID int(11) and Default_Img enum('Yes','No'). Users can have as many images as they like, but it is optional. I want to select from user_data and image_data and get the results based upon the rest of the query. The problem is my sql is only pulling out the users with images and ignoring the rest my sql looks like this: SELECT * FROM user_data, image_data WHERE user_data.User_ID = image_data.User_ID AND image_data.Default_Img = 'Yes' GROUP BY user_data.User_ID thanks for your help. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] SQL help
The DB is MySQL 4.0.16, all tables are MyISAM "Martin Towell" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > You'll need to do a left/right outer join. > > as you didn't say which database you're using, I'll give this back to you to > do some reading up on how to do it... > > HTH > Martin > > > > -Original Message- > > From: Marc Greenstock [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, 11 February 2004 1:53 PM > > To: [EMAIL PROTECTED] > > Subject: [PHP] SQL help > > > > > > Hi all here's my problem, > > > > I have two tables: 'user_data' and 'image_data' > > > > obviously user_data has all the user information and > > image_data has all the > > image information > > > > in image_data are the fields: Image_ID int(11), User_ID int(11) and > > Default_Img enum('Yes','No'). Users can have as many images > > as they like, > > but it is optional. > > > > I want to select from user_data and image_data and get the > > results based > > upon the rest of the query. The problem is my sql is only > > pulling out the > > users with images and ignoring the rest > > > > my sql looks like this: > > > > SELECT * FROM user_data, image_data > > WHERE user_data.User_ID = image_data.User_ID > > AND image_data.Default_Img = 'Yes' > > GROUP BY user_data.User_ID > > > > thanks for your help. > > > > -- > > 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] SQL help
That works well, Thanks all. "Warren Vail" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > The problem is you are using a hard join which will only return rows where > there are matching entries in both tables. What you probably want is called > a left join, however you have a further complication. > > You have to have an image row to have a image_data.Default_Img = 'Yes'. So > this query is really designed to only return users who have default images > established (other images don't count either). > > Haven't tested this, but it reflects my understanding of your expectation > (haven't double checked syntax either, but you can at > http://www.mysql.com/doc/en/index.html); > > SELECT * FROM user_data > left join image_data > on user_data.User_ID = image_data.User_ID > where image_data.Default_Img in ('Yes', '') > GROUP BY user_data.User_ID > > hope this works for you, good luck, > > Warren Vail > > > -Original Message- > From: Marc Greenstock [mailto:[EMAIL PROTECTED] > Sent: Tuesday, February 10, 2004 6:53 PM > To: [EMAIL PROTECTED] > Subject: [PHP] SQL help > > > Hi all here's my problem, > > I have two tables: 'user_data' and 'image_data' > > obviously user_data has all the user information and image_data has all the > image information > > in image_data are the fields: Image_ID int(11), User_ID int(11) and > Default_Img enum('Yes','No'). Users can have as many images as they like, > but it is optional. > > I want to select from user_data and image_data and get the results based > upon the rest of the query. The problem is my sql is only pulling out the > users with images and ignoring the rest > > my sql looks like this: > > SELECT * FROM user_data, image_data > WHERE user_data.User_ID = image_data.User_ID > AND image_data.Default_Img = 'Yes' > GROUP BY user_data.User_ID > > thanks for your help. > > -- > 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
[PHP] sql expression
Hi all, I am trying to provide a star sign search so that the user can search for any given star sign eg Gemini and retrieve all the users who belong to that sign. I have a table with all the star signs, in the table are the fields 'Name','From','To'. Both the 'From' and 'To' are an integer of the relevant dates eg in the 'Gemini' row I have: Gemini, 521, 621 (521 means May 21st, 621 means June 21st). I hope I'm explaining my self ok. Now in the users table I have date of birth stored in the Date format eg; 1979-06-20. Here is my current stab at this. SELECT * FROM users WHERE MONTH(user_data.User_DOB) >= 5 AND DAYOFMONTH(user_data.User_DOB) >= 21 AND MONTH(user_data.User_DOB) <= 6 AND DAYOFMONTH(user_data.User_DOB) <= 21 Obviously this wont work because anyone born, lets say on the 20th will not fit that criteria. I've tried other methods but I cant seem to figure out the correct syntax. I thought using CONCAT may work eg: SELECT * FROM users WHERE CONCAT(MONTH(user_data.User_DOB),DAYOFMONTH(user_data.User_DOB)) BETWEEN 521 AND 621 but that doesn't seem to work either. Can someone help please? Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Re: sql expression
Ok I spoke too soon, I did this: SELECT * FROM users WHERE ((MONTH(user_data.User_DOB) * 100) + DAYOFMONTH(user_data.User_DOB)) BETWEEN 521 AND 621 as in I multiplied MONTH with 100 and added the DAYOFMONTH Marc. "Marc Greenstock" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Hi all, > > I am trying to provide a star sign search so that the user can search for > any given star sign eg Gemini and retrieve all the users who belong to that > sign. > > I have a table with all the star signs, in the table are the fields > 'Name','From','To'. Both the 'From' and 'To' are an integer of the relevant > dates eg in the 'Gemini' row I have: > > Gemini, 521, 621 (521 means May 21st, 621 means June 21st). I hope I'm > explaining my self ok. > > Now in the users table I have date of birth stored in the Date format eg; > 1979-06-20. > > Here is my current stab at this. > > SELECT * FROM users > WHERE MONTH(user_data.User_DOB) >= 5 > AND DAYOFMONTH(user_data.User_DOB) >= 21 > AND MONTH(user_data.User_DOB) <= 6 > AND DAYOFMONTH(user_data.User_DOB) <= 21 > > Obviously this wont work because anyone born, lets say on the 20th will not > fit that criteria. > > I've tried other methods but I cant seem to figure out the correct syntax. > > I thought using CONCAT may work eg: > > SELECT * FROM users > WHERE CONCAT(MONTH(user_data.User_DOB),DAYOFMONTH(user_data.User_DOB)) > BETWEEN 521 AND 621 > > but that doesn't seem to work either. > > Can someone help please? > > Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Let's start a php-advanced list!
Interesting topic, However I don't necessarily agree that newbie's wont get their question answered. There are a lot of helpfully people out there, a lot of them are advanced in their programing but find the satisfaction of helping, or mentoring someone into advanced programming who is less advanced. I know that when i started I posted messages at phpbuilder in the newbie area. I found more often than not I would get a response from someone who cared, and would treat a newbie for what he or she is rather than a just a plain old idiot. My point is; yes advanced users would be separated from beginners, but most of the questions asked in the beginners list would be answered by advanced programmers looking for a bit of 'fuzzy wazzies' :) Two thumbs up for the idea. Marc Ryan A wrote: This has come up many times before and I really don't think it will work. Splitting advanced users from beginners means that there will be nobody to answer the beginner questions which means they will get posted to the advanced list where the people with the answers are. It is a self-defeating separation. Having everyone in one big lump means that both camps and all the camps in between learn from each other. The other question is who decides what is advanced? Chances are what you think is advanced may seem trivial to me, or vice-versa. -Rasmus True, When I started learning PHP one of the guys who answered most of the questions for me and a lot of people was Capt John Holmes, now that dude knows a load of php (I mean that as a complement). If there was an advanced list he would probably be in it and very unlikely that he would also be in the "newbie" list to help which would have made my learning curve that much harder. Some other guys who are really helpful and advanced are Jason, Chris, Chris, David to name a few..take all of them out and put them in the advanced list...and the newbies, not-so-newbies etc will follow just coz we have no choice when we run into problems. If only newbies and average knowledge dudes are in the "not advance list" it wont work coz the blind leading the blind does not work. My $0.2 Cheers, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] apache lookdown
Hi all, A long time ago I became accustomed to writing my php navigation structure using what I think is called apache lookdown (correct me if im wrong). Basically what it does is when a user types in www.example.com/index.php/doc/1/ apache checks to see if there is a directory called index.php/doc/1/ if there is it goes to it otherwise it goes down the chain until it gets to index.php. Now I have been using this for quite some time, I think its pretty cool, because it provides the user with a user friendly URI, and apparently google likes it too. Problem I am in the process of moving a site that uses this onto another server, that other server (Linux Red Hat, Apache 2.0) doesn't do the lookdown. It simply returns 404. Does anybody know how to fix this? Marc -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] apache lookdown
Thanks for that, I was looking around for ages, could not find it, I'm using a new ensim server with apache 2.0, there are so many httpd config files searching through all of them for something I didn't even know what I was looking for was a nightmare. Marc. "Brian Paulson" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > I had the same problem when we just moved and were able to solve it with > this > > > Options Indexes MultiViews > AcceptPathInfo On > > > Hth > > Thank You > Brian Paulson > Sr. Web Developer > [EMAIL PROTECTED] > www.chieftain.com > 1-800-279-6397 x 207 > > > > -Original Message- > From: Marc Greenstock [mailto:[EMAIL PROTECTED] > Sent: Thursday, March 11, 2004 1:36 AM > To: [EMAIL PROTECTED] > Subject: [PHP] apache lookdown > > Hi all, > > A long time ago I became accustomed to writing my php navigation structure > using what I think is called apache lookdown (correct me if im wrong). > > Basically what it does is when a user types in > www.example.com/index.php/doc/1/ apache checks to see if there is a > directory called index.php/doc/1/ if there is it goes to it otherwise it > goes down the chain until it gets to index.php. > > Now I have been using this for quite some time, I think its pretty cool, > because it provides the user with a user friendly URI, and apparently google > likes it too. Problem I am in the process of moving a site that uses this > onto another server, that other server (Linux Red Hat, Apache 2.0) doesn't > do the lookdown. It simply returns 404. > > Does anybody know how to fix this? > > Marc > > -- > 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
[PHP] Apple Mac Power PC problem
Hi all, I noticed on a clients Apple Mac Power PC that his php driven website wasn't working for him. It wasn't loading up at all, in fact it was returning an error that the URL could not be found. I discovered a quick fix for the problem, that is to create a index.html file and run a meta refresh to index.php, this seems to work. Something in the headers php sends seems to screw up Power PC's resolving method. The headers I send are: header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Cache-Control: no-store, no-cache, must-revalidate"); header("Cache-Control: post-check=0, pre-check=0", false); header("Cache-control: private"); header("Pragma: no-cache"); and what's being received is: HTTP/1.1·200·OK Date:·Thu,·01·Apr·2004·08:46:00·GMT Server:·Apache/1.3.27·(Unix)··(Red-Hat/Linux)·mod_jk/1.2.0·mod_perl/1.26·PHP /4.3.3·FrontPage/5.0.2·mod_ssl/2.8.12·OpenSSL/0.9.6bX-Powered-By:·PHP/4.3.3 Set-Cookie:·PHPSESSID=8ebf6b7d4895473a054bb8f50b2a66dd;·path=/ Expires:·Mon,·26·Jul·1997·05:00:00·GMT Cache-Control:·private Pragma:·no-cache P3P:·CP="NOI·ADM·DEV·PSAi·COM·NAV·OUR·OTRo·STP·IND·DEM" Last-Modified:·Thu,·01·Apr·2004·08:46:00·GMT Connection:·close Content-Type:·text/html Is there anything in these headers that could cause Power PC's to fail resolution? Thank. Marc. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Apple Mac Power PC problem
Hey Brent, The problem isn't within the server, the http.conf file accepts index.php as the first default file. The server is on a linux machine, and the mac is just a desktop connected to the internet. When i try to access the site on the mac, it says it can't find the url. I instantly thought it was a dns problem, but I pinged it at port 80 and it worked fine. I then proceeded to access some of the sites on the server that are purly html, that worked fine. Eventually I put a meta refresh on a page on one of the sites that was working to take it to the one that wasn't, that worked, and now the site is working fine from now on. But when I try a few other sites on the mac they don't work, same headers as the last. meta refreshing seems to work of course, but I need to find out why this is happening. marc "Brent Baisley" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] There is no problem with Power PC's or the headers. I've been using PHP and Apache for a few years now on Macs without a problem. What it sounds like is that they did not configure Apache to allow index.php as a default directory index page. As I recall, Apache defaults to only allowing index.html or index.htm as a default directory page, you need to add index.php to the configuration file. On Apr 1, 2004, at 3:24 AM, Marc Greenstock wrote: > Hi all, > > I noticed on a clients Apple Mac Power PC that his php driven website > wasn't > working for him. It wasn't loading up at all, in fact it was returning > an > error that the URL could not be found. > > I discovered a quick fix for the problem, that is to create a > index.html > file and run a meta refresh to index.php, this seems to work. > > Something in the headers php sends seems to screw up Power PC's > resolving > method. > > The headers I send are: > > header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"'); > header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); > header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); > header("Cache-Control: no-store, no-cache, must-revalidate"); > header("Cache-Control: post-check=0, pre-check=0", false); > header("Cache-control: private"); > header("Pragma: no-cache"); > > and what's being received is: > > HTTP/1.1·200·OK > Date:·Thu,·01·Apr·2004·08:46:00·GMT > Server:·Apache/1.3.27·(Unix)··(Red-Hat/Linux)·mod_jk/1.2.0·mod_perl/ > 1.26·PHP > /4.3.3·FrontPage/5.0.2·mod_ssl/2.8.12·OpenSSL/0.9.6bX-Powered-By:·PHP/ > 4.3.3 > Set-Cookie:·PHPSESSID=8ebf6b7d4895473a054bb8f50b2a66dd;·path=/ > Expires:·Mon,·26·Jul·1997·05:00:00·GMT > Cache-Control:·private > Pragma:·no-cache > P3P:·CP="NOI·ADM·DEV·PSAi·COM·NAV·OUR·OTRo·STP·IND·DEM" > Last-Modified:·Thu,·01·Apr·2004·08:46:00·GMT > Connection:·close > Content-Type:·text/html > > Is there anything in these headers that could cause Power PC's to fail > resolution? > > Thank. > > Marc. > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php