<?php 
        echo username_to_fullname($dbh, $from);
        ?>

			</div>

			<div class = "msg_reply_right">

				<?php 
        echo extract_date_time($time_sent);
        ?>

			</div>

			<p><?php 
        echo nl2br(htmlentities(text_prepare($body)));
        ?>
</p>

	</div>

<?php 
    }
}
?>



</div>
function get_Author($url)
{
    $productPage = phpQuery::newDocumentFile($url);
    return trim(str_replace('(Author)', '', text_prepare(pq($productPage)->find('#byline .author .a-popover-preload .a-size-medium')->text())));
}
Example #3
0
                    $link = pq($item)->find('a[id^="itemName_"]')->attr('href');
                    if (!empty($name) && !empty($link)) {
                        $total_ratings = pq($item)->find('div[id^="itemInfo_"] div:a-spacing-small:first a.a-link-normal:last')->html();
                        $total_ratings = trim(str_replace(array('(', ')'), '', $total_ratings));
                        $total_ratings = is_numeric($total_ratings) ? $total_ratings : '';
                        //$array[$i]['array'] = pq($item)->html();
                        $array[$i]['num'] = $i + 1;
                        $array[$i]['name'] = $name;
                        $array[$i]['link'] = $baseurl . $link;
                        $array[$i]['old-price'] = 'N/A';
                        $array[$i]['new-price'] = text_prepare(pq($item)->find('span[id^="itemPrice_"]')->html());
                        $array[$i]['date-added'] = text_prepare(str_replace('Added', '', pq($item)->find('div[id^="itemAction_"] .a-size-small')->html()));
                        $array[$i]['priority'] = text_prepare(pq($item)->find('span[id^="itemPriorityLabel_"]')->html());
                        $array[$i]['rating'] = 'N/A';
                        $array[$i]['total-ratings'] = $total_ratings;
                        $array[$i]['comment'] = text_prepare(pq($item)->find('span[id^="itemComment_"]')->html());
                        $array[$i]['picture'] = pq($item)->find('div[id^="itemImage_"] img')->attr('src');
                        $array[$i]['page'] = $page_num;
                        $array[$i]['ASIN'] = get_ASIN($array[$i]['link']);
                        $array[$i]['large-ssl-image'] = get_large_ssl_image($array[$i]['picture']);
                        $array[$i]['affiliate-url'] = get_affiliate_link($array[$i]['ASIN']);
                        $i++;
                    }
                }
            }
        }
    }
}
//format the xml (old style)
function xml_ecode($array)
{