[PHP] Rotation of images
I can use ImageMagick to rotate images, and that would be my preferred technique, but I was wondering how you might use GD to rotate images. As far as I can see, it's not possible. Anyone tried it? Mick e-ssociate EPSON (UK) Ltd. Tel 01442 227374 www.epson.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] SAP documentation
I'm interested in the possibility of interfacing with SAP for a project using PHP or Perl. I've not found any documentation that might help yet: Can anyone point me in the direction of any help? I've only used PHP with MySQL to date. Thanks, Mick e-ssociate EPSON (UK) Ltd. Tel 01442 227374 www.epson.co.uk -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Looking for a forum
I went through a load of forum systems recently that I found on www.hotscripts.com, but none of them had what I wanted - In the end, I used the bare-bones forum system in 'PHP MySQL Web Development' by Welling and Thomson and added: - My own existing login system (I was integrating forums into a larger project) - My own templating system - Separate forums - A bunch of other functions such as 'who's online', #topics, #posts, last post, last user to post, etc. In the end, after spending nearly 2 weeks fiddling around trying to work out why people use variables like $a, $b and $c and never comment their code, I managed to get my system running smoothly with no 'workarounds' to incorporate complex systems. I'm really happy with the end result, and I'd recommend starting from the bottom up rather than stripping out the unnecessary code from other projects. If you only need a forum and want a fully-featured solution, I'd recommend phpBB from those I looked at. Mick -Original Message- From: Paul Nicholson [mailto:[EMAIL PROTECTED]] Sent: 26 September 2002 12:20 To: [EMAIL PROTECTED]; John Taylor-Johnston; [EMAIL PROTECTED] Subject: Re: [PHP] Looking for a forum -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hey, http://www.ibforums.com/ ~Pauly On Thursday 26 September 2002 01:26 am, John Taylor-Johnston wrote: Hi, I'm looking for some forum script, a bit like this: http://www.chevelles.com/cgi-bin/forum/Ultimate.cgi Can anyone post a link to something useful? John - -- ~Paul Nicholson Design Specialist @ WebPower Design The webthe way you want it! [EMAIL PROTECTED] It said uses Windows 98 or better, so I loaded Linux! Registered Linux User #183202 using Register Linux System # 81891 -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9ku11DyXNIUN3+UQRAvs9AJ4jGZ9X4QKEXQDhKYXBLAjTXzO/ygCcCHXw aT5wk0Z0Lc97xlqpIgQQaHs= =po2u -END PGP SIGNATURE- -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] RE: Who is online script example
I have my own login system - which authenticates against a MySQL database and then uses sessions to keep track of logins. It registers a session variable for last access time, and logs access to pages in a separate table. Then I can do things like this: function currently_active_users(){ //Returns a formatted string of currently logged in (and with valid sessions) users $query = SELECT DISTINCT user_id from log_access WHERE (UNIX_TIMESTAMP(NOW())-UNIX_TIMESTAMP(lastaccess)) (30*60);//Users accessing the site in last half an hour. $db = db_connect(); $result = mysql_query($query, $db); while ($row = mysql_fetch_array($result)) { $users_online .= $row[user_id]; $users_online .= , ; } //loop through and add returned users to string. $users_online = substr($users_online, 0, -2);//Ditch last comma and space. return $users_online; } Dunno if this is any use to you? Mick -Original Message- From: Research and Development [mailto:[EMAIL PROTECTED]] Sent: 25 September 2002 23:26 To: PHP General List Subject: Who is online script example Hello. Has anyone noticed that some sites can display a list of users currently looking at their site? I would like to see the code to do such things. Thanks in advance. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Newbie problem with POST vars
Sorry if this is a bit simple: I'm trying to loop through $_POST vars in a function, which I understand to be an autoglobal associative array. Here's the code I'm using: foreach($_POST as $item = $value){ echo $item, $valuebr; } However, I only get the first element of the array echoed, even though I know there to be other elements (I can access them as $_POST[element]) Any ideas? Cheers, Mick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Newbie problem with POST vars
I've tried this, but it's still doing the same thing. Is there something special about this particular variable that I need to know? I've tried it with $HTTP_POST_VARS as well, declaring $HTTP_POST_VARS as global in the function first. Put reset($_POST) before foreach loop I'm trying to loop through $_POST vars in a function, which I understand to be an autoglobal associative array. Here's the code I'm using: foreach($_POST as $item = $value){ echo $item, $valuebr; } However, I only get the first element of the array echoed, even though I know there to be other elements (I can access them as $_POST[element]) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Newbie problem with POST vars
print_r($_POST); shows all the elements in the array as I expect them to be. That foreach loop is only picking the first element, though. At least it's reassured me that I'm not going mad, though, so thanks for that. Mick I've tried this, but it's still doing the same thing. Is there something special about this particular variable that I need to know? I've tried it with $HTTP_POST_VARS as well, declaring $HTTP_POST_VARS as global in the function first. Put reset($_POST) before foreach loop I'm trying to loop through $_POST vars in a function, which I understand to be an autoglobal associative array. Here's the code I'm using: foreach($_POST as $item = $value){ echo $item, $valuebr; } However, I only get the first element of the array echoed, even though I know there to be other elements (I can access them as $_POST[element]) What do you get if you do: print_r($_POST); -- Jason Wong - Gremlins Associates - www.gremlins.com.hk Open Source Software Systems Integrators * Web Design Hosting * Internet Intranet Applications Development * /* I gave up Smoking, Drinking and Sex. It was the most *__horrifying* 20 minutes of my life! */ -- 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] Timing out session cookies
Hi, How do I set an expiration time on a session cookie? I basically want to log users out automatically after a period of inactivity. Cheers, Mick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Poor results with GD
I'm currently setting JPEG quality to 85%, hence the large file sizes. Normally, I'd be looking for better quality and file sizes about 70% of their current size. Some of the originals are scanned directly from the painting, which yields very high quality, some are taken with a digital camera (I could live with poorer quality on these). I'm using some functions I found in 'PHP and MySQL web development' with some modifications, so JPEGs are generated from uploaded files and stored on the server through an HTML form interface. Here's the core bit of the code: $src = ImageCreateFromJPEG($image); $dst = ImageCreate($tn_width,$tn_height); ImageCopyResized($dst, $src, 0, 0, 0, 0, $tn_width,$tn_height,$width,$height); ImageJpeg($dst, $path, $compression); //compression set to 85 here. ImageDestroy($src); ImageDestroy($dst); Mick -Original Message- From: Andrew Brampton [mailto:[EMAIL PROTECTED]] Sent: 15 April 2002 17:56 To: Sear, Mick; [EMAIL PROTECTED] Subject: Re: [PHP] Poor results with GD They looked ok to me, but I don't know what the orginals looked like. But the problem might be that your JPeg quality is set lower than you would like. You can increase it be setting a parameter in ImageJPEG() or most likly whatever function you are using Andrew - Original Message - From: Sear, Mick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, April 15, 2002 4:32 PM Subject: [PHP] Poor results with GD Not sure if anyone else uses GD much, but I've been experimenting with it and PHP recently and I've found I get large file sizes and very 'aliased' graphics. Can anyone suggest a fix/ alternative? You'll see what I mean if you look at www.msear.com/paintings/ where the images are currently all generated with GD (but not for long, I think!) Cheers, Mick -- 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] Poor results with GD
Excellent advice, thanks. I was using GD 1.6.2 :( so will sort this and try again. Mick -Original Message- From: Richard Archer [mailto:[EMAIL PROTECTED]] Sent: 15 April 2002 22:58 To: [EMAIL PROTECTED] Subject: Re: [PHP] Poor results with GD At 5:32 PM +0200 15/4/02, Sear, Mick wrote: Not sure if anyone else uses GD much, but I've been experimenting with it and PHP recently and I've found I get large file sizes and very 'aliased' graphics. gd is the correct tool for your job. But there are some caveats. You will need to be using gd-2.0 or better to get satisfactory results for this sort of work. gd-2.0.1 supports: bicubic interpolation for scaling images 24-bit (true colour) images Make sure your images aren't being converted to 8-bit at any stage of the scaling/cropping process. Use ImageCreateTrueColor to create images. Oh, and there's a bug in either php-4.1.2 or gd-2.0.1 where scaling and cropping with one operation using imagecopyresampled fails. I use a work-around of cropping with imagecopyresized and then scaling with imagecopyresampled. The large file sizes could be improved by reducing the quality of the JPEG compression. Also, once the images have been scaled smoothly, there will be fewer sharp edges allowing JPEG compression to be more efficient. ...R. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Poor results with GD
Not sure if anyone else uses GD much, but I've been experimenting with it and PHP recently and I've found I get large file sizes and very 'aliased' graphics. Can anyone suggest a fix/ alternative? You'll see what I mean if you look at www.msear.com/paintings/ where the images are currently all generated with GD (but not for long, I think!) Cheers, Mick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php