[PHP] attach an ICO file to a text file...then downloading to the user
is it possible to add a custom icon to a text file on the server side..and then download the completed file to the user's desktop would you put some type of AddType into the htacccess folder to do this ? like AddType image/x-icon .ico can php do something like this ? many thanks g
[PHP] php and SMS
I want to send SMS Text messages to cell phones from my server app I would also like cell phones to be able to send text messages back to my app how does one go about doing this ? Can I do a 'get' or a 'post' to some kind of sms gateway url ? does anyone know what the costs are for something like this ? just getting into this...so any help would be appretiated g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] attaching a custom icon to a file on server side
I want to attach a custom icon to a dynamically created text file on the server-side when the user downloads the file to his desktop, there is a custom icon...ico file attached to it... is this possible ? g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Re: attaching a custom icon to a file on server side
Is there another way to pull this offmaybe if it was a Windows Server ? or compressing the text file and an ico file on the server before download ? g On Aug 29, 2004, at 2:54 PM, FrzzMan wrote: [EMAIL PROTECTED] wrote: I want to attach a custom icon to a dynamically created text file on the server-side when the user downloads the file to his desktop, there is a custom icon...ico file attached to it... is this possible ? g nah, you can't embed binary data (icon file) into text file... -- 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] Multidimensional Array advice from a newbie
Hi :) I am creating an XML file out of a mysql query with nested arrays. Currently I can get 1 element and 1 child with a properly formatted XML file with the below script . My question is: How do I add 3 to 4 more child elements to the below 'playlist' array ? Currently ,I have one parent 'Artist' and one child 'english' ... I need to add more child elements to the 'Artist' array like urlPath, spanish, biography, etc My addled thoughts... So, would the multidimensional array be like: $playlist[ [$artist [ ] ][$media[ ] ] [$mediaElement] ]? for the 'trackName' child: $playlist [ "Artist 1" ] [ "Track 1" ] [ "trackName" ] or for 'urlPath' child : $playlist [ "Artist 1" ] [ "Track 1" ] [ "urlPath" ] Do I have to add another dimension to the 'playlist' array? Do I need another foreach loop ? Is there an easier more efficient way to do this? Be nice to spell out the schema in some way in the script...in case you need to add more levels...like a 'subCategory' I am a bit new to this so any help would be greatly appretiated head is spinning a bit $sql = 'SELECT artist.artist_name, media.english, media.path '; $sql .= 'FROM media, artist '; $sql .= 'WHERE artist.artist_id = media.artist_id LIMIT 0, 30 '; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $playlist[$row['artist_name']] [] = $row['english']; //would like to add more children here... } $xml = "\n"; foreach ($playlist as $artist => $media) { $num_media = count($media); $xml .= "\n"; $xml .= "\t\n"; $xml .= "\t\t".$artist."\n"; $xml .= "\t\n"; $xml .= "\t\n"; foreach ($media as $mediaVal) { $xml .= "\t\t\n"; $xml .= "\t\t\t".$mediaVal."\n"; ///add more children ///add more children $xml .= "\t\t\n"; } $xml .= "\t\n"; $xml .= "\n"; } $xml .= "\n"; print $xml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] creating a nested multidimensional array from a query
Hi :) I am on my second week of php so be gentle I am creating an XML file out of a mysql query with nested arrays. Currently I can get 1 element and 1 child with a properly formatted XML file with the below script . My question is: How do I add 3 to 4 more child elements to the below 'playlist' array ? Currently ,I have one parent 'Artist' and one child 'english' ... I need to add more child elements to the 'Artist' array like urlPath, spanish, biography, etc Do I have to add another dimension to the 'playlist' array? Do I need another foreach loop ? Is there an easier more efficient way to do this? Be nice to spell out the schema in some way in the script...in case you need to add more levels...like a 'subCategory' I am a bit new to this so any help would be greatly appretiated head is spinning a bit $sql = 'SELECT artist.artist_name, media.english, media.path '; $sql .= 'FROM media, artist '; $sql .= 'WHERE artist.artist_id = media.artist_id LIMIT 0, 30 '; $result = mysql_query($sql); while ($row = mysql_fetch_array($result)) { $playlist[$row['artist_name']] [] = $row['english']; //would like to add more children here... } $xml = "\n"; foreach ($playlist as $artist => $media) { $num_media = count($media); $xml .= "\n"; $xml .= "\t\n"; $xml .= "\t\t".$artist."\n"; $xml .= "\t\n"; $xml .= "\t\n"; foreach ($media as $mediaVal) { $xml .= "\t\t\n"; $xml .= "\t\t\t".$mediaVal."\n"; ///add more children ///add more children $xml .= "\t\t\n"; } $xml .= "\t\n"; $xml .= "\n"; } $xml .= "\n"; print $xml -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] how to iterate over fields names with mysql_fetch_assoc
How do I iterate over fields when I perform the below script: each row has: artist_name,urlPath,biography as fields while ($row = mysql_fetch_assoc($result)) { # if the current field name is 'artist_name', do something switch($GetCurrentFieldNameintheCurrentRow) { case $row[ 'field name is now: artist_name'] //do something break; } If I write the below code, I only get the first field name of each row...which makes sense In this case, I get 'artist_name' while ($row = mysql_fetch_assoc($result)) { $fieldName= key($row); echo 'fieldName is: '.$fieldName."\n"; } many thanks :) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] how to iterate over fields names with mysql_fetch_assoc
thanks...that is what I had used previously :) Another php coder had given me a hint that I could just take each incoming row on the fly with $row['artist_name'] without reading everything into an array: What I had previously was: while ($row = mysql_fetch_assoc($result)) { $playlist[] = $row; //read in entire array before doing anything } # get row count $c= count($playlist); for ($x = 0; $x < $c; $x++) { foreach($playlist[$x] as $key => $val) { switch ($key) { # if key name is 'artist_name', do something case 'artist_name' : break; # if key name is 'urlPath', do something case 'urlPath' : break; } } } is there a way to grab the info on the fly without reading the $result into an array ? many thanks as I am on my 3rd week with php On Jun 19, 2004, at 1:45 PM, Robin Vickery wrote: On Sat, 19 Jun 2004 13:25:54 -0700, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: How do I iterate over fields when I perform the below script: ... If I write the below code, I only get the first field name of each row...which makes sense In this case, I get 'artist_name' while ($row = mysql_fetch_assoc($result)) { $fieldName= key($row); echo 'fieldName is: '.$fieldName."\n"; } $fieldValue) { echo 'fieldName is: '.$fieldName."\n"; echo 'fieldValue is: '.$fieldValue."\n"; } } ?> -- 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] attach ICO [icon] files to a file thru php
is it possible to attach a custom icon [like an ICO file on the server] to a file thru php ? I want to automatically generate a generic text file [ which is XML that launches a Quicktime Movie] that has a custom icon attached to it... then, I want to automatically send that newly created file in an email...with a user id code for verification the php used to generate the text file [minus the icon] would be something like: ' . "\n" . '' . "\n" . ''; Header('Content-Type: application/x-quicktimeplayer'); Header('Content-Length: '.strlen($buffer)); Header('Content-disposition: inline; filename=theMovie.qtl'); print $buffer; ?> is this possible? g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php