WebSite X5Help Center

 
Frantisek Vodrazka
Frantisek Vodrazka
User

Email and IP adress  en

Author: Frantisek Vodrazka
Visited 1806, Followers 2, Shared 0  

Hello.
Please, give me an advice. I need the email form on the site to send the sender's IP address. Which and where to insert a script or html code to make it work?

Thank you in advance for any advice.

Posted on the
9 ANSWERS - 1 USEFUL
Andre E
Andre E
Moderator

Sorry, but why would you send the IP adress of the sender to him?

He can look it up on his computer, it's his adres. I don't understand why you shuld provide it.

Anyway a function like that is not available in x5, maybe search for some custom code that show's him his ip adres or something?

Read more
Posted on the from Andre E
Frantisek Vodrazka
Frantisek Vodrazka
User
Author

Page - form - sender

My email (recipient) - I need IP addresses of the sender

Read more
Posted on the from Frantisek Vodrazka
John S.
John S.
User

Hello Frantisek

You can get the Ip via php. Example : $theipyouwant = $_SERVER['REMOTE_ADDR'];

This gives an Ip but in most cases it is the IP for the clients provider. Even if you use a method that gives you the client IP it will probably be a dynamic IP you get.

You can via this IP, get the country code for the client and a nearby city.

I use ipinfo.io. You can see more information here : http://ipinfo.io/

Unfortunately the mailform does not have the ability to have user-defined fields.

This is a wish I have seen also from other persons.

https://helpcenter.websitex5.com/en/post/175253

https://helpcenter.websitex5.com/en/post/153744

https://helpcenter.websitex5.com/en/post/175265

https://helpcenter.websitex5.com/en/post/152042

Maybe it will be possible in the future - it is not at the moment.

Kind regards

John S.

Read more
Posted on the from John S.
Frantisek Vodrazka
Frantisek Vodrazka
User
Author

Hello John.

Paradox is that the "Guestbook" IP address save :-)

php: $theipyouwant = $_SERVER['REMOTE_ADDR']; - I found on the net. I'm not a programmer. I need help with implementation. Where and how. :-)

Best regards, Franta

Read more
Posted on the from Frantisek Vodrazka
Andre E
Andre E
Moderator

franta,

It still helps if you say why, IMHO there is not much use and as John has explained it has no consistancy for an email form.

Maybe there are other or better solutions for your problem / issue.

Read more
Posted on the from Andre E
Frantisek Vodrazka
Frantisek Vodrazka
User
Author

Hello Andre

The client requires this :-(

The header of the sent email writes it - Attachment

Try some advice?

Read more
Posted on the from Frantisek Vodrazka
John S.
John S.
User

Hello Franta

You could search the net for "contact form builder" or "mail form builder". There is a product like :

Contact form 7, that has this feature : https://contactform7.com/special-mail-tags/

Unfortunately it is an add-on for Word Press : -(

I don't know how skilled you are, but you could make your own form, or use a form builder.

There are free form-builders and some to pay for.

You could make a php-script that sends data to a MySQL table. This should be rather easy.

This php could be called via adding an include in the end of the imEmailForm.php. You could then store variables from the imEmailForm.php and then the $_SERVER['REMOTE_ADDR']. This way you had stored every mail in the table and with the IP. Disadvantage is, that you maybe have to make the include line, every time there is an update.

To view the data you could use the database viewer, or you could use the free REPORTICO software that is very flexible and that can select on a date interval and other things, before a report is run. Even when the report is presented you can make more search and selections. You could have the report in a restricted area.

I really hope X5 will make a more flexible (mail)form in the near future.

Kind regards

John S.

Read more
Posted on the from John S.
Frantisek Vodrazka
Frantisek Vodrazka
User
Author

Hello John

Thank you for the link. I will look at it and try to use it in the project.

Best regards, Franta

Read more
Posted on the from Frantisek Vodrazka
Andre E
Andre E
Moderator

Hello Frantisek,

I would still ask your customer why he requires this.

Sorry to be persistant but if he has a certain reason for this and it does not turn out the way he wants it, then what?

You need to inform him about possibilities and usefullnis before you make a lot of effort. It's in everybody's intrest.

Read more
Posted on the from Andre E