The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Watermark
tudsy
post 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)
Attached File  ecovib2d_adriant.php ( 16.23k ) Number of downloads: 631
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post 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?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post 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.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
CharlesEF
post 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.
Attached File  watermark.zip ( 282.07k ) Number of downloads: 881
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
tudsy
post Apr 13 2018, 10:03 PM
Post #5


Advanced Member
****

Group: Members
Posts: 246
Joined: 30-September 14
Member No.: 21,611



QUOTE(CharlesEF @ Apr 12 2018, 09:12 AM) *

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.
Attached File  watermark.zip ( 282.07k ) Number of downloads: 881




No I have not got it working and thank you for the examples.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 18th March 2024 - 09:56 PM