PDA

View Full Version : Resolved PHP help needed



tgallagher26
03-16-2009, 09:25 PM
Ok so I am trying to add <?php echo curPageURL(); ?>

To
<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {$pageURL .= "s";}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
include 'simple_html_dom.php';
$html = file_get_html("RIGHT HERE");
foreach($html->find('td[name=desc]') as $e);

?>

Can anyone help?

Tim..

Nile
03-17-2009, 01:23 AM
I guess...



<?php
function curPageURL() {
$pageURL = 'http';
if ($_SERVER["HTTPS"] == "on") {
$pageURL .= "s";
}
$pageURL .= "://";
if ($_SERVER["SERVER_PORT"] != "80") {
$pageURL .= $_SERVER["SERVER_NAME"].":".$_SERVER["SERVER_PORT"].$_SERVER["REQUEST_URI"];
} else {
$pageURL .= $_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"];
}
return $pageURL;
}
include 'simple_html_dom.php';
$html = file_get_html(curPageUrl());
foreach($html->find('td[name=desc]') as $e);

?>

tgallagher26
03-17-2009, 12:26 PM
Thanks for you help Niles