Re: [PHP] GD and Converting a Transparent PNG-8 to a Transparent GIF

2009-01-18 Thread Graham Anderson
I got it to work :) Like you had recommended, I found a script in http://php.net/imagecolortransparent from: fmkaiba at optonline dot net 07-Feb-2008 08:05. The function is called, createthumb Cheers Graham On Jan 18, 2009, at 4:46 PM, Jochem Maas wrote: Graham Anderson schreef: Hi I am

[PHP] ob_start("ob_gzhandler") producing garbage before document header

2009-01-18 Thread Graham Anderson
Hi, using ob_gzhandler produces a 5-8 characters, �“×2���, before the document header. Using ob_start() does not produce the text garbage. Is there a way to get ob_start("ob_gzhandler") to behave? Many thanks in advance Abridged Code: ob_start("ob_gzhandler"); //produces initial text ga

Re: [PHP] GD and Converting a Transparent PNG-8 to a Transparent GIF

2009-01-18 Thread Graham Anderson
the directory $gifDir imagegif($img, $gifAbsolutePath); imagedestroy($img); On Jan 18, 2009, at 4:46 PM, Jochem Maas wrote: Graham Anderson schreef: Hi I am having problems getting GD to convert a transparent PNG-8 to a transparent GIF The below WILL produce a GIF...but leaves a white backgrou

[PHP] GD and Converting a Transparent PNG-8 to a Transparent GIF

2009-01-17 Thread Graham Anderson
Hi I am having problems getting GD to convert a transparent PNG-8 to a transparent GIF The below WILL produce a GIF...but leaves a white background # Convert the PreExisting PNG Image to a GIF $img = imagecreatefrompng($pngPath); # Set the GIF to be transparent: Does not seem to work $trans_

[PHP] Preg_Replace $pattern syntax error [solved]

2008-06-09 Thread Graham Anderson
I needed to add the ~ character as a delimiter. So, the below now works $pattern='~(.*?)~'; G Hi How can I convert the regular expression:left:\s+(\d+)px;">(.*?) into a pattern that PHP will accept? I am getting the error: Warning: preg_replace() [function.preg-replace]: Unknown modifier

[PHP] Preg_Replace $pattern syntax error

2008-06-09 Thread Graham Anderson
Hi How can I convert the regular expression:\s+(\d+)px;">(.*?) into a pattern that PHP will accept? I am getting the error: Warning: preg_replace() [function.preg-replace]: Unknown modifier '(' in /Library/WebServer/Documents/tamagotchi/runtime/content/js/tiny_mce/ examples/tinymce_regex

Re: [PHP] Best Practices for calling 'setup' classes that extend 'parent' classes?

2007-09-01 Thread Graham Anderson
ude statements. You will only make yourself miserable in the long run. On Mon, August 20, 2007 1:52 pm, Graham Anderson wrote: What is the best practice for correctly targeting 'include' paths when using Initialization/Setup classes that extend Parent classes? In my extend_parent_class.

[PHP] Best Practices for calling 'setup' classes that extend 'parent' classes?

2007-08-20 Thread Graham Anderson
What is the best practice for correctly targeting 'include' paths when using Initialization/Setup classes that extend Parent classes? In my extend_parent_class.php file, I have to provide an incorrect relative path. Apparently, the path (that does work) is relative to php file that calls t

Re: [PHP] ADODB Insert Question (Syntax)

2007-08-09 Thread Graham Anderson
Wow. I feel really dumb. I thought (incorrectly) that the surrounding quotes would screw with the variables in the ADODB's INSERT statement. many thanks G On Aug 7, 2007, at 2:06 PM, Uber Wannabe wrote: -Original Message- From: Graham Anderson [mailto:[EMAIL PROTECTED]

[PHP] ADODB Insert Question (Syntax)

2007-08-07 Thread Graham Anderson
Hi What is the proper way to get the ADODB class to automatically add quotes to the below sql ? I'm guessing that the below fails because none of the variables get quoted with the method, qstr. $sql = "insert into email (to_name, to_email, from_name, from_email, subject, message, timestam

[PHP] Anyone recommend a great phpmysql knowledge base?

2007-07-08 Thread Graham Anderson
Does anyone have a positive experience with an 'out of the box' Knowledge Base system (hopefully open-source) that easily allows developers to easily share/post/publish/document their code? I know this question is a a bit general, but I figure a lot of you guys are on such a system at work

Re: [PHP] Shiny Floor (web 2.0) effect with GD Library

2007-04-16 Thread Graham Anderson
Many Thanks :) That would be it. On Apr 16, 2007, at 10:25 AM, Richard Davey wrote: Graham Anderson wrote: Has anyone created that web 2.0 "shiny floor" effect with the GD Library? I have seen it dynamically created by passing variables into a Flash movie. Has this been do

Re: [PHP] Shiny Floor (web 2.0) effect with GD Library

2007-04-16 Thread Graham Anderson
Here is an example of a 'Shiny Floor' effect (dynamically generated with flash). http://alistapart.com/d/semanticflash/shiny/ look like the one in my kitchen or one of those old Java water effects? Personally, I prefer the Quicktime 'Fire' effect. As to the effect itself, I wanted to see i

[PHP] Shiny Floor (web 2.0) effect with GD Library

2007-04-16 Thread Graham Anderson
Has anyone created that web 2.0 "shiny floor" effect with the GD Library? I have seen it dynamically created by passing variables into a Flash movie. Has this been done with GD? many thanks -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.ph

Re: [PHP] Pass a relative path [with slashes] into a 'clean' url

2006-12-05 Thread Graham Anderson
ike: $url = preg_replace("|/[^/]/\\.\\./|", "/", $url); On Mon, December 4, 2006 9:11 pm, Graham Anderson wrote: What is a good/accepted way to pass a relative or absolute path into a clean url ? I could replace the relative url's slashes with another character, but would love t

[PHP] Pass a relative path [with slashes] into a 'clean' url

2006-12-04 Thread Graham Anderson
What is a good/accepted way to pass a relative or absolute path into a clean url ? I could replace the relative url's slashes with another character, but would love to know a cleaner less confusing way...if it exists example url: http://localhost/testscript/../image.png/jpeg/42/0/ e

Re: [PHP] Acceptably Converting a 24bit PNG to a JPEG?

2006-12-02 Thread Graham Anderson
_array[2] * 16) + $color_array[3]); $B = (($color_array[4] * 16) + $color_array[5]); return array($R,$G,$B); unset($color_array,$hex,$R,$G,$B); } ?> On Dec 2, 2006, at 1:33 PM, Richard Lynch wrote: I suspect that if you do an "imagecopyresampled" or somesuch into a fresh NEW image, you'd g

[PHP] Acceptably Converting a 24bit PNG to a JPEG?

2006-12-01 Thread Graham Anderson
Is there some trick to getting PHP GD to properly convert a 24bit PNG [with alpha] into a JPEG without garbling the image output? The below will output the jpg image, but it appears that the alpha channel from the original png is garbling the jpeg a bit To no avail, I tried setting imageAlph

[PHP] Inserting header() info into ob_start

2006-11-14 Thread Graham Anderson
How can I insert header() info directly into the ob_start stream? I am compressing a css file with php before it is outputted to the browser, The below DOES work, but I have to insert the php header() info DIRECTLY into the css file. Otherwise, mystyle.css is interpreted as text/html inste

Re: [PHP] Compressing both php and linked css files with ob_gzhandler and htaccess

2006-11-13 Thread Graham Anderson
Unfortunately, I am on a shared server for this project :( Is there some way to enable mod_deflate without admin server privs? many thanks On Nov 13, 2006, at 1:59 PM, steve wrote: Why use php to compress at all? Use mod_deflate. On 11/13/06, Graham Anderson <[EMAIL PROTECTED]> wrote

Re: [PHP] Compressing both php and linked css files with ob_gzhandler and htaccess

2006-11-13 Thread Graham Anderson
yes :) I DID try that strangely, turning it off disables/kills the css file g On Nov 13, 2006, at 2:08 PM, Jochem Maas wrote: Graham Anderson wrote: Can I compress a php file AND its referenced css files at the same time ? Currently, I am using ob_gzhandler to compress my php files

[PHP] Compressing both php and linked css files with ob_gzhandler and htaccess

2006-11-13 Thread Graham Anderson
Can I compress a php file AND its referenced css files at the same time ? Currently, I am using ob_gzhandler to compress my php files only . Works great:) As I have found that you CAN NOT use ob_gz and zlib at the same time, how do I amend the htaccess file to use ob_gz, These files

[PHP] Automagically using Pecl Filter for user input

2006-09-29 Thread Graham Anderson
How can I use PECL Filter to 'automagically' filter user input ? I DO understand calling the PECL filter directly in a PHP script like so: $clean['name'] = input_get(INPUT_POST, 'name', FL_REGEXP, array ('regexp' => '^[\w ]+$')); $clean['age'] = input_get(INPUT_POST, 'age', FL_INT); $c

[PHP] Is anyone using DBG Debugger on OS X ?

2006-07-10 Thread Graham Anderson
Has anyone successfully compiled/used DBG debugger with OS X and PHPEclipse ? I am getting pretty cryptic compile errors as I am not a unix guru. many thanks to the brighter folks who have been down this road. I have: OS X 10.4.7 PHP 5.1.4 www.entropy.ch Release 5 (Universal Binary) Ec

[PHP] XML_Serializer and creating multi-level XML

2006-06-21 Thread Graham Anderson
How can you use XML_Serializer to generate XML with multiple levels ? XML_Serializer seems really useful for single level XML docs like:

Re: [PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Graham Anderson
thanks :) that helps g On May 24, 2006, at 3:19 PM, Brady Mitchell wrote: This works: $rs= $this->conn->GetAll("SELECT title FROM content WHERE page_id= ?", $id); You can't iterate through an array like you are trying to do. Using the GetAll() function returns an array, you have to use

[PHP] Syntax to call a class' methods in your own class

2006-05-24 Thread Graham Anderson
What is the correct syntax for calling methods from other classes into your own class ? Example: Calling the ADODB class with: $this->conn=&ADONewConnection('mysql'); This works: $rs= $this->conn->GetAll("SELECT title FROM content WHERE page_id= ?", $id); This fails: while (!$rs->$this->

Re: [PHP] Debug/Learn Recursion of an Object

2006-05-18 Thread Graham Anderson
I got it :) just put a print_r at each step of the function like: print_r($part->$parts); thanks g On May 18, 2006, at 11:59 AM, Robert Cummings wrote: On Thu, 2006-05-18 at 14:11, Graham Anderson wrote: I am a bit new to Objects and Recursion Any push in the right direction

[PHP] Debug/Learn Recursion of an Object

2006-05-18 Thread Graham Anderson
I am a bit new to Objects and Recursion Any push in the right direction is appreciated Generated from Pear's mimedecode, I have an object whose print_r is: http://www.siren.cc/dev/object.txt The function below will correctly traverse the object and find the 'correct' node. Unfortunately, it

[PHP] Parsing a stdClass Object created with mimeDecode

2006-05-11 Thread Graham Anderson
Hi I am trying to get the body text from a number of different emails using mimeDecode [Pear] Unfortunately, it appears that the body text could be in any number of locations in the stdClass Object depending on which email is processed. At this point, I can only access the node by looking a

Re: [PHP] Can PHP route Sendmail to a MYSQL DB ?

2006-05-08 Thread Graham Anderson
thanks :) I'll check it out g On May 8, 2006, at 11:02 AM, Richard Lynch wrote: On Mon, May 8, 2006 12:45 pm, Graham Anderson wrote: I need to specific emails to insert directly into a mysql database The server uses sendmail/php/mysql Essentially, all emails sent TO and FROM &#

[PHP] Can PHP route Sendmail to a MYSQL DB ?

2006-05-08 Thread Graham Anderson
I need to specific emails to insert directly into a mysql database The server uses sendmail/php/mysql Essentially, all emails sent TO and FROM '[EMAIL PROTECTED]' are emailed normally and, then, inserted into the company_email database. Is there something out there that already does this...lik

[PHP] Communicate with Windows Media Server with PHP

2005-12-06 Thread Graham Anderson
Is there a repository of php scripts that can communicate with Windows Media Server I am looking to do some load balancing with our 4 media servers in San Jose, Washington, Dallas, London Essentially, I need to get the number of current users on a particular server. If the server has over

[PHP] php scripts that communicated with Windows Media Server

2005-11-25 Thread Graham Anderson
Does anyone know if there are any repositories of php scripts that communicate with Windows Media Server... I am looking for stuff like getting the number of connected users, and etc I have seen perl scripts that do this...but not php anyone know ? g -- PHP General Mailing List (http://ww

[PHP] great examples of using PHP to dynamically generate ASX files

2005-11-24 Thread Graham Anderson
Are there any great examples/tutorials of building advanced ASX files with PHP ? I have built a lot of playlists with Quicktime/ PHP/MYSQL...but I am a windows media noob any resources and/or examples are appreciated :) g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, vi

[PHP] Darwin Streaming Server and PHP

2005-11-19 Thread Graham Anderson
Has anyone used PHP to communicate with Darwin Streaming server ? if so, how can you get the number of connected users and other related info. Does not seem to be a lot of info on this out there anyone been down this road ? g -- PHP General Mailing List (http://www.php.net/) To unsubscribe,

[PHP] replicate a live stream from one server to another with php and wget [slightly ot]

2005-11-17 Thread Graham Anderson
has anyone here used wget or similar command to redirect/reflect a live stream data from one server to another server ? I wanted to use each server's upload bandwidth to transfer a live stream to a new server that way, my hope is that I can balance the bandwidth load a bit between serv

Re: [PHP] Using Ajax to spit out a php-generated embed tag

2005-10-31 Thread Graham Anderson
you can get some kind of .mov player to run Ajax. And you could have PHP spitting out the QT movie from a http://php.net/readfile or similar. Hell, you could write a PHP script to GENERATE a QuickTime movie on the fly, if you knew QT internals enough to do it. On Sun, October 30, 2005 6:34 pm, Gra

[PHP] Using Ajax to spit out a php-generated embed tag

2005-10-30 Thread Graham Anderson
Can you use AJAX to output an entire php-generated embed tag into a web page? something like: height="352" width="216" codebase="http://www.apple.com/qtactivex/ qtplugin.cab"> EOB; header('Content-Type: text/xml'); // ajax only seems to like text/xml header('Content-Length: '.strle

[PHP] Re: DataCodecCompress and zLib problem (solved)

2005-10-28 Thread Graham Anderson
DOH! OK, I was starting at the wrong place in the hex I misread the QTFF docs which include two more atoms on the NEXT page: Four-character code Atom type 'cmvd'Compressed movie data Uncompressed size32-bit integer The correct output

[PHP] Re: DataCodecCompress and zLib problem (solved)

2005-10-28 Thread Graham Anderson
a#?swrMade with LiveStage Proplugmoviename=drm.mov ctypnone play On Oct 28, 2005, at 2:26 PM, Graham Anderson wrote: Ok, here we go :) Isn't looking through reams of hex data a blast ? Kind of like a hot poker in the eye ;) curl -l -i "http:

Re: [PHP] Decompressing a string with zlib problems

2005-10-28 Thread Graham Anderson
"."\r\n"; echo $decompressed_zlib_movieheader_string."\r\n\r\n"; echo '//-----'."\n\r"; echo "Here is the attempt to use gzuncompress with the movieheader compressed in Livestage: ".&

[PHP] Decompressing a string with zlib problems

2005-10-27 Thread Graham Anderson
I am having problems decompressing a zlib'd string located in a file. In the file headers, the compression says that it is zlib. But, when I 'gzinflate' the string, I get the error: gzinflate(): data error in Is the below NOT a zlib or some strange variant ? anyone know ? g $hex="C0636D766

Re: [PHP] Decompress a zlib'd string in PHP

2005-10-26 Thread Graham Anderson
ed a few of the bytes to: 00 00 22 B6 6D 6F 6F 76 00 00 22 AE 63 6D 6F 76 ..".moov..".cmov 00 00 00 0C 64 63 6F 6D 7A 6C 69 62 00 00 22 9A dcomzlib..". And then I was able to parse the file with a custom QT parser I assembled: On Oct 26, 2005, at 7:53

Re: [PHP] Decompress a zlib'd string in PHP

2005-10-26 Thread Graham Anderson
osed to be the compression method for the below string: fixúµRøo1ˆ](R• [EMAIL PROTECTED] ∞ÅTïÜ ©TQT1t1gÁŒäÌ;ùù+eÈ‘ˇѯòÏå å¸+·ŸÁ˚맆ƒK|ˆ{~˛figø° ...and so on has anyone had experience with this ? g On Oct 26, 2005, at 12:15 PM, Jochem Maas wrote: Graham Anderson wrote: Just to show

Re: [PHP] Decompress a zlib'd string in PHP

2005-10-26 Thread Graham Anderson
; On Oct 26, 2005, at 10:20 AM, Jochem Maas wrote: Graham Anderson wrote: How do you decompress a zlib'd string located in a file with php ? I need to dynamically write a password string into a movie file. It appears that in QuickTime movie API, all sprite variables/ values are

[PHP] Decompress a zlib'd string in PHP

2005-10-26 Thread Graham Anderson
How do you decompress a zlib'd string located in a file with php ? I need to dynamically write a password string into a movie file. It appears that in QuickTime movie API, all sprite variables/values are zlib'd inside the movie file So I need to: find the string decompress a zlib'd strin

Re: [PHP] How to protect a php script that sends variables to itself

2005-10-25 Thread Graham Anderson
thanks, Richard :) The simplest solution is usually the best As you suggested, I used php to created a 'log in' movie which upon authentication loads the playlist of movies Also, as you suggested, I think I'll create a session id with a master password, can see everything, and a 'movie spe

Re: [PHP] How to protect a php script that sends variables to itself

2005-10-24 Thread Graham Anderson
actually all sarcasm is appreciated ;) at least, I got a laugh. I am learning/experimenting with ways to add DRM to movies. Why: My script, makeMoviePlaylist.php, is calling the script, brain.php, to build the movies to send to QuickTime I wanted to prevent the user from directly accessing this

[PHP] How to protect a php script that sends variables to itself

2005-10-24 Thread Graham Anderson
the below is the curl'd output of the php script: curl -l -i "http://www.myserver/scripts/makeMoviePlaylist.php"; Content-Length: 263 Content-Type: video/quicktime /* } Problem: if the users does this: curl -l -i "http://www.myserver/scripts/makeMoviePlaylist.php? cmd=makesmil" From

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-15 Thread Graham Anderson
rgetting to lock the front door g On Oct 15, 2005, at 3:04 AM, Chris Shiflett wrote: Graham Anderson wrote: my htaccess file for the folder containing the php script was not set properly What does that mean? Are you telling us that /home/siren/includes/ is within document root? If it'

[PHP] Offseting Binary File Data with php

2005-10-14 Thread Graham Anderson
I need to figure out a way to iterate through a binary file and offset values between two address by a fixed number //--- Why ? I am attempting to add file data to a pre-existing Quicktime file In the Quicktime file format, the 'stco' atom stores the location of all the track dat

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-14 Thread Graham Anderson
the array of movies*/$movieArray); break; case 'getmovie': // if the 'REQUEST variable, 'path' , exists: $path = isset($_REQUEST['path']) ? cleanser($_REQUEST ['path']): $path="null&q

Re: [PHP] prevent user from getting scripts outside the web folder [this better?]

2005-10-13 Thread Graham Anderson
leanser script: function cleanser( $value ) { return mysql_real_escape_string( trim( $value ) ) ; } the 'decrypt' function uses MCRYPT_RIJNDAEL_256 with a $key stored outside the web folder. many thanks :) g On Oct 13, 2005, at 2:36 PM, Graham Anderson wrote: Ok, I just he

Re: [PHP] prevent user from getting scripts outside the web folder

2005-10-13 Thread Graham Anderson
2005-10-13 at 17:05, Graham Anderson wrote: How does a hacker get access to your scripts located outside the web folder? I asked a friend to hack my php script within the web folder... Ummm, the obvious thing to do is ask your friend how he did it, then we'll tell you how to prevent it in

[PHP] prevent user from getting scripts outside the web folder

2005-10-13 Thread Graham Anderson
How does a hacker get access to your scripts located outside the web folder? I asked a friend to hack my php script within the web folder... all of my crucial function were called by: require_once("/home/siren/includes/fonovisa.inc"); the 'encrypt' functions are MCRYPT_RIJNDAEL_256 He was abl

Re: [PHP] Can't compare a decrypted variable to a string ?

2005-10-13 Thread Graham Anderson
many thanks :) I'll try this g On Oct 13, 2005, at 10:27 AM, Jochem Maas wrote: Graham Anderson wrote: For some reason, I have to store a decrypted string as a variable before I can compare it to another string. The decrypt function is located in another php script //Get variable

[PHP] Can't compare a decrypted variable to a string ?

2005-10-13 Thread Graham Anderson
For some reason, I have to store a decrypted string as a variable before I can compare it to another string. The decrypt function is located in another php script //Get variable $cmd = $_REQUEST['cmd']; echo $cmd; // uJy4p09z6bSR80eLNFnBWBj/EsRCfIz2C/WrcFNcZE8= echo decrypt($cmd);// mak

[PHP] Making MYSQL's RAND() more random

2005-10-03 Thread Graham Anderson
what would be the best way to make MYSQL's RAND() more random ? my random result set always seems pretty predictable. The first record in the result set always seems to be the same 4 tracks :( Would adding some kind of random seed like RAND($randomNumberGenerator) work ? If so, how do you imp

Re: [PHP] decrypting query string back into $_GET['var'] [resend]

2005-10-03 Thread Graham Anderson
rypt); return $encode; } // Decrypt function decrypt($decrypt) { global $key; $key = "6r9qEJg6"; $decoded = base64_decode($decrypt); $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND); $decrypted = mcrypt_decrypt(MCRYPT_RIJNDA

Re: [PHP] decrypting query string back into $_GET['var']

2005-09-30 Thread Graham Anderson
rypt function decrypt($decrypt) { global $key; $key = "6r9qEJg6"; $decoded = base64_decode($decrypt); $iv = mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND); $decrypted = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, $decoded, MCRYPT_MODE_ECB, $iv); r

Re: [PHP] decrypting query string back into $_GET['var']

2005-09-29 Thread Graham Anderson
thanks :) that was exactly what I needed g On Sep 29, 2005, at 9:33 AM, Jochem Maas wrote: Graham Anderson wrote: What is the best way to decrypt a query string back into variables ? $root = "http://www.myserver.com/script.php";; $queryString = "?test=mytest&co

[PHP] decrypting query string back into $_GET['var']

2005-09-29 Thread Graham Anderson
What is the best way to decrypt a query string back into variables ? $root = "http://www.myserver.com/script.php";; $queryString = "?test=mytest&color=red"; myEncrypt($queryString); //add mCrypt encryption $finalURL = $root.$encryptedQueryString; what is the proper what to decrypt the GET v

Re: [PHP] How to Looking at Raw Binary Data with PHP and curl

2005-09-24 Thread Graham Anderson
ecoded, MCRYPT_MODE_ECB, $iv); return $decrypted; many thanks g On Sep 24, 2005, at 2:25 PM, Jasper Bryant-Greene wrote: Graham Anderson wrote: How do you display raw binary data of a file sent from a server with curl ? You can probably just use file_get_contents() if allow_url_fopen

[PHP] How to Looking at Raw Binary Data with PHP and curl

2005-09-24 Thread Graham Anderson
How do you display raw binary data of a file sent from a server with curl ? When I curl a movie file with curl -l -i "path2file/file.php",I get the below output in my Terminal. file.php: $find = array($find1,$find2,$find3,$find4); $replace = array($replace1,$replace2,$replace3,$replace4)

Re: [PHP] how to stream a movie file with fread [success] Now, how to do a fast encrypt ?

2005-09-23 Thread Graham Anderson
what I want :) I want to write a data handler on the user side that connects to a db and gets the $find and $replace keys to unlock the movie many thanks in advance...and yes, I am experimenting On Sep 23, 2005, at 4:07 PM, Graham Anderson wrote: I am trying to stream a movie file with '

[PHP] how to stream a movie file with fread

2005-09-23 Thread Graham Anderson
I am trying to stream a movie file with 'fread' this my first step in trying to dynamically encrypt the file as it is being streamed from the server do I need to fread the data in chunks? If so, how? $filename ="$path2file"; $file = fopen($filename,'r'); $fileSize = filesize($filename); $Conte

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Graham Anderson
; Would the movieBuilder.php file retain the POST'ed variables ? Or, would they be lost in the void. maybe this approach is silly? g On Sep 23, 2005, at 1:25 PM, Jasper Bryant-Greene wrote: Graham Anderson wrote: The below method is the way I send variables to the movieBuilder.php f

[PHP] how to encrypt a readfile($file) on the fly ?

2005-09-23 Thread Graham Anderson
is it possible to encypt a file dynamically as it is being readfile'd ? I want to create a key stored in a db that decrypts the file once it reaches the user's computer. This file is being progressively loaded...loads and plays at the same time something like: header("ETag: ".md5(time())); he

Re: [PHP] Re: Posting variables from one php script to another

2005-09-23 Thread Graham Anderson
The below method is the way I send variables to the movieBuilder.php file [located in the 'src' attribute] with GET Variables It does work :) How would I use CURL to POST the same variables to the movieBuilder.php file WITHIN the 'src' attribute ? FYI, I am able to POST to the movieBuilder.

Re: [PHP] Posting variables from one php script to another

2005-09-22 Thread Graham Anderson
5, at 6:52 PM, Jasper Bryant-Greene wrote: Graham Anderson wrote: In a POST request: $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "./movieBuilder.php"); I think you may need to put the full URL here. I don't do a lot with CURL, though, so someone else may be able to he

Re: [PHP] Posting variables from one php script to another

2005-09-22 Thread Graham Anderson
ibute in the embed tag: //Generate the Quicktime movie $xml = << EOB; many thanks :) g On Sep 22, 2005, at 5:31 PM, Jasper Bryant-Greene wrote: Graham Anderson wrote: I am using GET to send variables from one php script to another php script How would I POST the same variables ?

[PHP] Posting variables from one php script to another

2005-09-22 Thread Graham Anderson
I am using GET to send variables from one php script to another php script How would I POST the same variables ? This is the php script I am sending GET variables to... $movieBuilder = "./movieBuilder.php?mask=mask.gif&drag=drag.gif&movie=fonovisa.mov"; I am placing $movieBuilder in the "src

[PHP] elegant way to convert relative to absolute urls

2005-09-22 Thread Graham Anderson
is there a simple function out there that converts relative urls like ../../myfile.php to an absolute url ? g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: elegant way to convert relative to absolute urls

2005-09-22 Thread Graham Anderson
need to clarify :) I found the 'realpath' function I need to convert: ../../myfile.php to http://www.myserver.com/dir/myfile.php many thanks g On Sep 22, 2005, at 2:08 PM, Graham Anderson wrote: is there a simple function out there that converts relative urls like ../../

Re: [PHP] Problems with headers

2005-09-22 Thread Graham Anderson
thanks guys :) encoding in utf-8 NO BOM seems to do the trick g On Sep 22, 2005, at 11:05 AM, Jim Jagielski wrote: Set BBEdit to use Mac OS Roman. From the main window, choose the file icon (5th from left). Graham Anderson wrote: --Apple-Mail-15-928383921 Content-Transfer-Encoding

Re: [PHP] Problems with headers

2005-09-22 Thread Graham Anderson
b y t e s " ) ; \n h e a d 400 e r ( " C o n t e n t - L e n 420 g t h : " . s t r l e n ( $ x 440 m l ) ) ; \n h e a d e r ( ' C o 460 n t

Re: [PHP] Problems with headers

2005-09-22 Thread Graham Anderson
#0 know what it could be ? g On Sep 22, 2005, at 5:18 AM, Rasmus Lerdorf wrote: Graham Anderson wrote: '."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .=

Re: [PHP] Problems with headers

2005-09-21 Thread Graham Anderson
ormation - headers already sent by (output started at /home/www/siren/siren/fonovisa/skintest/Library/php/ fonovisa_simple.php:1) in /home/www/siren/siren/fonovisa/skintest/Library/php/ fonovisa_simple.php on line 12 On Sep 21, 2005, at 7:46 PM, Stephen Leaf wrote: On Wednesday 21 September 2005 09

Re: [PHP] Problems with headers

2005-09-21 Thread Graham Anderson
#x27;."\n"; $xml .= ''."\n"; $xml .= ''."\n"; $xml .= ''; header('Content-Type: video/quicktime'); //took out a space header ("Content-Length: ".strlen($xml)); // added a space echo $xml; ?> On Sep 21, 2005, at 7:25

[PHP] Problems with headers

2005-09-21 Thread Graham Anderson
I am trying to get headers to output properly Even though I am defining Content-type as 'video/quicktime' , the output is still text/html Also, Content-Length is not outputting properly either :( On the positive side, It appears to be outputting the $xml string correctly, but screws up o

[PHP] How to output a PNG with GD with same headers as pre-existing PNG file

2005-09-15 Thread Graham Anderson
I am trying to get a PNG created with GD to output exactly as a pre-existing PNG file on the server I have an app that is being very finicky about how it is loading images :( Within Quicktime, If I point to the PNG file directly on the server, it works. this works: $image = isset($_GET['ima

Re: [PHP] Sending different languages to GD

2005-09-06 Thread Graham Anderson
o try would be to convert to UTF-8l mb_convert_encoding($text, 'UTF-8','iso-8859-2'); And, if that doesn't work. Ensure the font you're specifying can handle the characters you're giving it. (Arial Unicode would probably be a safe test font) hope this help

Re: [PHP] Sending different languages to GD [apologize for resend]

2005-09-06 Thread Graham Anderson
sorry about that -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Sending different languages to GD

2005-09-06 Thread Graham Anderson
How can I get Polish , iso-8859-2, text, to output properly ? PHP is reading the accent characters as blocks I tried this, but it did not work... // Set up text for a 'Polish' button $text = "rozwiązania"; $text = mb_convert_encoding($text, "iso-8859-2","Auto"); // Composit the text over a bu

[PHP] Sending different languages to GD

2005-09-06 Thread Graham Anderson
How can I get Polish , iso-8859-2, text, to output properly ? PHP is reading the accent characters as blocks I tried this, but it did not work... // Set up text for a 'Polish' button $text = "rozwiązania"; $text = mb_convert_encoding($text, "iso-8859-2","Auto"); // Composit the text over a bu

[PHP] Compositing 3 images at once with GD

2005-09-03 Thread Graham Anderson
is there a way to take 3 objects: button graphic picture thumbnail text from a POST and composit them together at the same time ? I guess I could take the first 2 elements: button graphic and the picture thumbnail...and then imagecopy it... and then take that composited image and overlay text

[PHP] How to get GD to handle different image formats?

2005-09-03 Thread Graham Anderson
I would like the gd library to handle the vector image format, PCT. GD is installed on my shared server and, unfortunately, ImageMagick is not :( ImageMagick CAN export PCT files. Can I get GD to do this too ? g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http:/

[PHP] Making Text [not the background] transparent

2005-08-31 Thread Graham Anderson
How do I make the text transparent over the background ? In my web app, I want to to put a layer BEHIND the image to control the color of the php-created text So, the layer color in the web app shows thru the text php creates Would like to use alpha transparency so the color looks clean :)

Re: [PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-25 Thread Graham Anderson
27;) in /home/www/siren/siren/fonovisa/Library/php/genericTestv4.php on line 6 many thanks, Chris :) g On Aug 25, 2005, at 6:44 PM, Chris Shiflett wrote: Graham Anderson wrote: Is the below reasonable safe ? I have all of my main functions outside the web folder I am including this funct

[PHP] Newbie: Safe function call to a .inc file outside the web folder

2005-08-25 Thread Graham Anderson
I am relatively new to security Is the below reasonable safe ? I have all of my main functions outside the web folder I am including this function with every php script that accesses fonovisa.inc function getBrain() { $temp = explode('.', $_SERVER['SERVER_NAME']); // returns 'www.myse

Re: [PHP] Easier way to clean GET Variables ?

2005-08-25 Thread Graham Anderson
thanks guys :) that was exactly what I needed good karma to you g On Aug 25, 2005, at 6:19 AM, Robert Cummings wrote: On Thu, 2005-08-25 at 03:14, Richard Lynch wrote: On Wed, August 24, 2005 10:06 pm, Graham Anderson wrote: Is there a way to loop thru all of these GET requests by: putting

[PHP] Easier way to clean GET Variables ?

2005-08-24 Thread Graham Anderson
Is there a way to loop thru all of these GET requests by: putting the GET variables into an array processing the variable strings with trim/striptags/etc in a loop exploding the variables back out into separate variables otherwise this gets a bit tedious :( many thanks in advance g $userID =

[PHP] Newbie: How to universalize a mysql=>xml script

2005-08-24 Thread Graham Anderson
Hi I am try to create a generic function that takes any mysql found set and creates and custom tiered xml list The below works but seems a bit kludgy :( Code synopsis: If we are are on a new row and the first value in that row , , is different...then do something Is there a cleaner and more

Re: [PHP] AJAX & PHP

2005-08-03 Thread Graham Anderson
generated without a full page reload on the same page... kind of an interactive graphing web tool. any examples of this sort are appreciated :) g On Aug 3, 2005, at 9:36 AM, Mikey wrote: Graham Anderson wrote: not a whole lot of info on the subject for working with graph classes :( at

Re: [PHP] AJAX & PHP

2005-08-03 Thread Graham Anderson
deep in the subject, so far I have not found resources. Thanks in advance!! -Original Message- From: Graham Anderson [mailto:[EMAIL PROTECTED] Sent: Martes, 02 de Agosto de 2005 01:46 p.m. To: php Subject: Re: [PHP] AJAX & PHP Has anyone integrated JPGraph [or another php graph c

Re: [PHP] AJAX & PHP

2005-08-02 Thread Graham Anderson
Has anyone integrated JPGraph [or another php graph class] into a PHP/AJAX setup ? I would really like to integrate interactive graphs based upon user variables. Would be fantastic. Are there any examples out there ? g -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Screen Scraping with php

2005-07-07 Thread Graham Anderson
thank Robert :) I ran the script and got: Warning: ereg(): REG_BADRPT on line 6 which is in the ereg function do you know what it could be ? will woodshed a bit on ereg g On Jul 7, 2005, at 6:51 PM, Robert Cummings wrote: $html = file( 'http://www.gamespot.com/pc/rpg/guildwars/screens.html?p

[PHP] Screen Scraping with php

2005-07-07 Thread Graham Anderson
I am trying to use php to pull an url out of an html page If I have an html page that is being 'fread' and the html source contains the below and, I want to get the image: http://image.com.com/gamespot/images/2005/132/ 914653_20050513_screen006.jpg class="spacer6"> src="http://image

[PHP] getting a filename [with no extension] out of a url

2005-06-30 Thread Graham Anderson
if $_SERVER['SCRIPT_NAME'] give this /folder/folder/Library/php/filename.php what would be the proper way to strip the string until only 'filename' is left I'm a bit new at eregi stuff any help would be appreciated many thanks g -- PHP General Mailing List (http://www.php.net/) To unsub

  1   2   >