[PHP-WIN] PHP & Samba

2013-09-05 Thread Jorge F. Hernandez

Hey guys,

Does anybody know a way to browse a Samba (smb) server using PHP?

Thanks.

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP-WIN] GD imagerectangle() function - background transparency?

2013-09-05 Thread Jacob Kruger
Just wondering, if I load an existing image into an image resource, and then 
draw a rectangle on it using the GD imagerectangle() function, and specifically 
not using the imagefilledrectangle() function, does the new rectangle/box 
overlay the existing image content, or just draw the outlines thereof 
onto/overlaying the existing content?

Alternatively, should I load the existing image, then use something like 
imagecreatetruecolor() to create another image resource of the same dimensions, 
fill it with an obscure colour, draw the rectangle on it, set the transparency 
colour for that specific image resource to the obscure colour, and then copy it 
over the original/existing image resource before outputting/returning the 
combination?

TIA

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'


Re: [PHP-WIN] PHP & Samba

2013-09-05 Thread Anatol Belski
Hi,

On Thu, 2013-09-05 at 10:46 -0400, Jorge F. Hernandez wrote: 
> Hey guys,
> 
> Does anybody know a way to browse a Samba (smb) server using PHP?
> 
> Thanks.
> 

If files were only I'd be interested on, I'd mount it as a drive on
windows or as a folder on linux.

Regards

Anatol



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-WIN] GD imagerectangle() function - background transparency?

2013-09-05 Thread Pierre Joye
hi!

On Thu, Sep 5, 2013 at 10:35 PM, Jacob Kruger  wrote:
> Just wondering, if I load an existing image into an image resource, and then 
> draw a rectangle on it using the GD imagerectangle() function, and 
> specifically not using the imagefilledrectangle() function, does the new 
> rectangle/box overlay the existing image content, or just draw the outlines 
> thereof onto/overlaying the existing content?
>
> Alternatively, should I load the existing image, then use something like 
> imagecreatetruecolor() to create another image resource of the same 
> dimensions, fill it with an obscure colour, draw the rectangle on it, set the 
> transparency colour for that specific image resource to the obscure colour, 
> and then copy it over the original/existing image resource before 
> outputting/returning the combination?

imagecopy supports alpha, imageoverlay lets you define the mode. But
I'm not sure what kind of results you try to achieve, please put a
link to an example result image with the two source images, it could
help :)

-- 
Pierre

@pierrejoye | http://www.libgd.org

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-WIN] PHP & Samba

2013-09-05 Thread Pierre Joye
hi

On Thu, Sep 5, 2013 at 4:46 PM, Jorge F. Hernandez  wrote:
> Hey guys,
>
> Does anybody know a way to browse a Samba (smb) server using PHP?

Network paths work just fine with any file functions. If you need
special authentication like domain auth under a different users, then
there are many classes out there providing this feature.

And as Anatol suggested, if you need to always access the same network
path, mounting it may provide additional benefits as well.


-- 
Pierre

@pierrejoye | http://www.libgd.org

-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-WIN] GD imagerectangle() function - background transparency?

2013-09-05 Thread Jacob Kruger
Effectively, I've got sort of template images, and want to sort of draw 
multiple outline boxes onto them where users can then choose one to then 
insert text onto image - almost like a form of eCard template rendition, 
but, bit different.


I was originally trying to show the boxes/areas to the user using relatively 
positioned template images, overlaid by absolutely positioned div elements, 
with coloured borders, handled using CSS, and then jQuery to manipulate the 
highlighted/chosen one by changing it's border-color CSS attribute, 
client-side/at runtime, but, this doesn't always seem to cooperate/implement 
it at run time.


Have now told them will try sort of dynamically generating a version of the 
template image, server-side, with the various area outlines drawn onto it, 
which can then reload at run-time when a new text outline area is selected, 
but initially tried creating an image resource from the template file, and 
then using imagerectangle to draw a rectangle onto it, after allocating the 
relevant colour, and setting drawing thickness, but, it seemed to be 
blanking out the template image, so I then tried creating a new image 
resource of the same dimensions, filling it up with an obscure colour, draw 
the rectangle onto it, set it's transparency to the obscure colour, and then 
use either imagecopy() or imagecopymerge() to copy it over the original 
template image, but, still seems to be just blocking out the actual template 
image.


Now, suppose will maybe also try out splitting the blocks to be drawn up 
into actual lines, and just try drawing the lines onto the original template 
image, and see if that works, since at the moment, apparently the 
combination output image is just a white background, with the coloured boxes 
on it - as in, it's again just blocked out the original image, as opposed to 
actually overlaying a somewhat transparent image onto it, and suppose this 
could be due to pallett's not matching, or something..?


Anyway, let me quickly slap together a couple of tests, and will try post a 
link, and source code, etc.


Thanks

Jacob Kruger
Blind Biker
Skype: BlindZA
'...fate had broken his body, but not his spirit...'

- Original Message - 
From: "Pierre Joye" 

To: "Jacob Kruger" 
Cc: "php-windows" 
Sent: Friday, September 06, 2013 7:59 AM
Subject: Re: [PHP-WIN] GD imagerectangle() function - background 
transparency?



hi!

On Thu, Sep 5, 2013 at 10:35 PM, Jacob Kruger  wrote:
Just wondering, if I load an existing image into an image resource, and 
then draw a rectangle on it using the GD imagerectangle() function, and 
specifically not using the imagefilledrectangle() function, does the new 
rectangle/box overlay the existing image content, or just draw the 
outlines thereof onto/overlaying the existing content?


Alternatively, should I load the existing image, then use something like 
imagecreatetruecolor() to create another image resource of the same 
dimensions, fill it with an obscure colour, draw the rectangle on it, set 
the transparency colour for that specific image resource to the obscure 
colour, and then copy it over the original/existing image resource before 
outputting/returning the combination?


imagecopy supports alpha, imageoverlay lets you define the mode. But
I'm not sure what kind of results you try to achieve, please put a
link to an example result image with the two source images, it could
help :)

--
Pierre

@pierrejoye | http://www.libgd.org


--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php