imap_search search by hyperlink in body - imap

How to use imap_search, for search by hyperlink in body.
For eg. if body contain html like ...Test... And I trying search as
$emails = imap_search($stream, 'Body "www.test.com"');
Above search is not returning any result.
Is it possible to search by hyperlink as above?

Related

Is there a syntax for links with no text in Markdown?

I want to write
http://www.foo.com/
and get a link with the URL as the text (e.g., in HTML output). I do not want to write
[http://www.foo.com/](http://www.foo.com/)
Is it possible?
Yes, here is the relevant section of the documentation:
AUTOMATIC LINKS
Markdown supports a shortcut style for creating “automatic” links for URLs and email addresses: simply surround the URL or email address with angle brackets. What this means is that if you want to show the actual text of a URL or email address, and also have it be a clickable link, you can do this:
<http://example.com/>
Markdown will turn this into:
http://example.com/
I find this works with my IDE nicely, wrapping the link in an <a> tag:
<a>http://example.com/</a>

struts2 passing parameters

New to Struts2.
I have a search criteria form(search1) ,where I have dropdown lists to submit to get a result page (consolidatedreports.jsp).
In my result page, I am showing the data from the search criteria, but I also have a form at the top of the results page with search2 criteria to submit again.
I am chaining my actions because the heading for the results page needs a value from the search1 criteria to determine a heading value.
This works
Question
Now I want the heading to change when I use the search2 form in the results page.
How can I use the values from the search criteria in the search1 and override search2 values in the results page when a user chooses new criteria to run a new report on the results page?
I am modifying someone's code so it has to be done like this.
Can someone suggest a link so I get some information?
please clarify your question...
Using the search criteria and the value which you have entered in your first search page go to your action class.
There you have to check what are your search criteria.
Based on the criteria your codes for selecting values will be get differentiated.
That is you have to use if else if or some switch for each case according to your criteria.
Then in each case you have to bind your values into a list(if it is a server side coding.) and return the control to forwarding 2nd search page.
If it is a client side coding, you just need to return to 2nd page.
In the second page at top you can put your search boxes as in 1st page. then you can get the values from the list and print them, if its server side coding.
If its client side coding, get the selection value for criteria from action page , find the results using your calculations. print it..
the same action class can be used for your second page's search field also..
while submitting the form, keep a hidden field which will specify the name of your page, so that we can identify which search criteria is printing result, using that value you will be able to change your header values also.

How to display XML string in IE

I created a control that gets an xml string, I am trying to figure out how to display the xml content well-formatted in IE, instead of a plain string.
IE is natively able to display xml document, so maybe just an iframe would do the job.
Or, if your string contains line breaks and is indented, you can wrap it in <pre></pre> tags.

parsing some code for url

I have to extract some code of the web page: *http://www.bebesymas.com/edades/bebes-de-menos-de-6-meses/bebe-de-4-meses The problem that I have is what I would like to extract is when I click on the icon "Leer Mas". With Firebug I see that it seems that it executes some Ajax code. How could I extract the correct URL to can extract what I want. Many thanks and sorry for my English
If you look at the NET tab in Firebug, you will see that when clicking the link it fetches this URL:
http://www.bebesymas.com/json/productdesc/20351/27211
Now if you search the HTML for 27211 you will find this:
So you just need to grab the productid and the postid from those two elements and then construct the URL like so:
http://www.bebesymas.com/json/productdesc/productid/postid

Beginner question about using YQL to get html webpage in json

I am trying to scrape a webpage using yql. I thought outputing it as json would give me all the content as one object. However if there are any html tags like < strong > that text is not included in "content". Is there any way around this or should I just get it as xml and regex out the tags?
It should return all elements from the page if your YQL statement is select * from html where url="http://www.cnn.com".
select * from html where url="http://www.cnn.com".

Resources