Jump to content

Capturing a email genetating via javascript


troshan

Recommended Posts

I'm using "simplehtmldom" to captured the elements.

I want to capture the email address from the following

 

uQJwk.png

the email is generating with javascript and It was decoded. So I know I can not capture the email.

I noticed, I couldn't select the "output" or It's child element for some reasons.

$myemail = $item->find ('#field_11 .output');

So I captured the whole div by following method

$myemail = $item->find ('#field_11');

and which out puts the following result.

i6fs0.png

I guess If I remove the <!-- I'll able to print the value. I was trying to trim the <!-- by follwing method but none of them work


trim($myemail, "!--//");

trim(strip_tags($myemail), "!--//");
trim(htmlentities($myemail), "!--//");

I was trying to decode the result by following functions but none of them work (I guess using REGEX I can extract the email after decode)

html_entity_decode
htmlspecialchars_decode
utf8_decode

Could anyone help me to achieve what I want? Please ignore if any of my method distract you from providing a right solution.

Edited by troshan
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.