Watermark |
Watermark |
tudsy |
Apr 2 2018, 08:34 AM
Post
#1
|
Advanced Member Group: Members Posts: 246 Joined: 30-September 14 Member No.: 21,611 |
Hi
I have decided to do the watermarking by php. At the moment, I am having problems in converting from jS to php and php to js. Can any one help? The relevant code is in the picname function in ecovib2d_adriant.php. Thanks. Attached File(s) ecovib2d_adriant.php ( 16.23k ) Number of downloads: 634 |
CharlesEF |
Apr 4 2018, 03:16 PM
Post
#2
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
I haven't had time to go over your code. But, since you want to use PHP now have you looked at this page?
|
CharlesEF |
Apr 8 2018, 01:54 PM
Post
#3
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Ok, I glanced over your code. I didn't get very far when I saw this:
CODE var path = 'http://103.226.223.161/~ecovibdc/ECOVIB2D/MYART/' + personname + '/Graphic/' + picname; . Then I saw this: CODE <?php $path='"+path+"'; watermarkImage ($path,'ECOVIB2D©', $picnamew); ?> . It looks like you defined a javascript variable and then tried to use that variable in a PHP call. As far as I know, you can't do it that way. If you have a javascript variable you want to use in PHP then you must send that variable to the server for PHP to use. You do that using a POST or GET request. Seems to me your watermark function should be setup to work using AJAX. Your current code will not pass the javascript variable to the server so your PHP $path variable isn't what you think it is. |
CharlesEF |
Apr 11 2018, 06:42 PM
Post
#4
|
Programming Fanatic Group: Members Posts: 1,981 Joined: 27-April 13 From: Edinburg, Texas Member No.: 19,088 |
Well, I haven't heard anything from you. Did you get it working? Attached is a couple of sample files: 'test.php' will show a watermarked image when you load the page. 'test.html' will let you select a picture from the drop down. Once a picture is selected a javascript AJAX call is made to display the watermarked image on screen.
If you haven't got it working then these examples should help. watermark.zip ( 282.07k ) Number of downloads: 884 |
tudsy |
Apr 13 2018, 10:03 PM
Post
#5
|
Advanced Member Group: Members Posts: 246 Joined: 30-September 14 Member No.: 21,611 |
Well, I haven't heard anything from you. Did you get it working? Attached is a couple of sample files: 'test.php' will show a watermarked image when you load the page. 'test.html' will let you select a picture from the drop down. Once a picture is selected a javascript AJAX call is made to display the watermarked image on screen. If you haven't got it working then these examples should help. watermark.zip ( 282.07k ) Number of downloads: 884 No I have not got it working and thank you for the examples. |
Lo-Fi Version | Time is now: 19th April 2024 - 10:12 PM |