Jump to content

neilh

Members
  • Posts

    10
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    England

neilh's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hello, I have a live stats box on my website which reloads every 6 seconds. Here's the code for the bit which does this, // Page Load Events function livestats() { MyAjaxRequest('onlinestats_ajax','/onlinestats.php'); setTimeout(livestats,6000); } function pageLoad() { livestats(); } the pageLoad() function is called in the body tag when the main page loads, and then the DIV which the ajax is loaded into shows the content. However if you have scrolled down the page after 6 seconds the page goes back up to the top. Now i can't work out why this is happening. If you want to see the Ajax JS file then here it is -> http://phptut.jungledog.co.uk/themes/default/ajax.js If you can help me sort this out it would be most appreciated! Thanks, Neil
  2. does anybody have any ideas? thanks..
  3. Hello, I'm trying to get email piping to a php script working. What i have so far is piping setup on a cPanel email address pointing to my php script which gets who its from, subject and message from the headers and then emails it to my email address. But the problem is in the email it sends me the message is coming back with all bits of header that havent been removed by the script. Here is the php file that i have currently. [code] <? // read from stdin $fd = fopen("php://stdin", "r"); $email = ""; while (!feof($fd)) { $email .= fread($fd, 1024); } fclose($fd); // handle email $lines = explode("\n", $email); // empty vars $from = ""; $subject = ""; $headers = ""; $message = ""; $splittingheaders = true; for ($i=0; $i<count($lines); $i++) { if ($splittingheaders) { // this is a header $headers .= $lines[$i]."\n"; // look out for special headers if (preg_match("/^Subject: (.*)/", $lines[$i], $matches)) { $subject = $matches[1]; } if (preg_match("/^From: (.*)/", $lines[$i], $matches)) { $from = $matches[1]; } } else { // e-mail body $message .= $lines[$i]."\n"; } if (trim($lines[$i])=="") { // empty line, header section has ended $splittingheaders = false; } } // mail neil with results... mail("myname@mydomain.co.uk",$subject,$message,"FROM: $from;"); ?> [/code] I'm getting these kind of things in my email. [code] This is a multi-part message in MIME format. ------=_NextPart_000_0035_01C71C96.88B56590 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit This is a message test to parser. ------=_NextPart_000_0035_01C71C96.88B56590 Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable xmlns:o=3D"urn:schemas-microsoft-com:office:office" = xmlns:w=3D"urn:schemas-microsoft-com:office:word" = xmlns=3D"http://www.w3.org/TR/REC-html40"> [/code] Does anybody know how to strip out all the headers so I'm just left with a message in this example the message is "This is a message test to parser." If anybody can help me i would be very grateful as I've been trying to figure this out for awhile. Thanks, neil
  4. Hello again, I've re-designed the site now so it isint that gray website. www.chromehost.net does this look more better now? Thanks for your comments Neil
  5. Hi, thanks for your feedback i'm going to make the buttons smaller and change a few colours so its not all to gray like you said. And also make the login look more better. Thanks again Neil
  6. I've edited some of the pages now, does it look better?
  7. Hi, Thank you i've now fixed the error and the site is Valid XHTML. I'm going to sort out the spacing you were saying about now :) Thanks Again for all your help. Neil
  8. Ok ive fixed most of them, but i have 3 errors left which i carnt work out how to fix. please could you give me some help thanks alot! [url=http://validator.w3.org/check?uri=http%3A%2F%2Fwww.chromehost.net%2F]http://validator.w3.org/check?uri=http%3A%2F%2Fwww.chromehost.net%2F[/url]
  9. thank you very much :) you know html css links [code]<LINK REL="StyleSheet" HREF="/includes/styles.css" TYPE="text/css" MEDIA="ALL">[/code] thats the one its saying theres something wrong.. can you tell me what the correct way is to include css files. Thanks edit: i've found the problem Xhtml is all lower case..
  10. [b]Hello, could you please give me some advice on improvements i could do on my website please.[/b] [url=http://www.chromehost.net]http://www.chromehost.net[/url] Thank You Neil
×
×
  • 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.