Archive for the ‘Google’ Category

iTunes remove podcast example rss xml feed itunes:block

Thursday, March 3rd, 2011

So you submitted your podcast, with a post containing placeholder content because you had to have it approved and live by some deadline, but now it’s deemed not presentable, because marketing has changed the title last minute, and as you change this first post’s content via its RSS feed, some of it changes, the dynamic parts most likely, the media, and so on, but the title isn’t changing in the iTunes store…

In my example, I used a feedburner feed (iTunes is using that), so I can simply change the feed source in feedburner, to something like the example xml feed in this post, and we can at least get the eyesore out of iTunes, freeing us up to make a new feedburner feed, and re-submit THAT anew to iTunes for a fresh clean go of things…

Host something like this somewhere, and point the old feedburner feed to it, done.

<?xml version=”1.0″ encoding=”UTF-8″?>
<rss xmlns:itunes=”http://www.itunes.com/dtds/podcast-1.0.dtd” version=”2.0″>
<channel>
<itunes:block>yes</itunes:block>
<title>A Title Is Required For The Feed To Validate</title>
</channel>
</rss>

session_start() php when to do it again!

Thursday, April 29th, 2010

I was stuck for a bit there.

I have a page that loads via AJAX, but I had to modify it to work for Google’s googlebot #! system…

The googlebot logic senses that it’s googlebot, and uses PHP includes instead of the AJAX!

Well the includes don’t need the session_start() again, but the AJAX loads DO!

So, NOT to be forgotten, session_start() will work per LOAD, hard to explain that, but you can wrap your head around it…

fancy!

BETTER SOLUTION: Sessions manager class, framework or similar…

Googlebot make your AJAX crawlable #! simply explained

Tuesday, April 13th, 2010

http://code.google.com/web/ajaxcrawling/

But what?

Put simply, in your URLs, that are currently:

http://www.site.com/index.php#page90

First, make them:

http://www.site.com/index.php#!page90

Your Javascript will just see the ! (bang) as a character, it won’t care, and will continue to work just fine

Googlebot though, sees the ! and changes its query to:

http://www.site.com/index.php?_escaped_fragment_=page90

So your index simply needs to see $_GET['_escaped_fragment_']

If it’s set, load page90 via PHP instead of AJAX, and there you have it,

now Google will link the content it found via:

http://www.site.com/index.php?_escaped_fragment_=page90

to the url:

http://www.site.com/index.php#!page90

Now alter/resubmit your Google Sitemap so that all your URLs are current (WITH the #!) and you’re set!

AWESOME!

Sending mail xampp gmail

Thursday, January 1st, 2009

source/reference:

http://expertester.wordpress.com/2010/07/07/how-to-send-email-from-xampp-php/

If you’re developing on your local xampp environment, eventually you will need your apps to actually send mail:

Change the following lines in your php.ini
(usually here C:\xampp\php\php.ini, but possibly also php5.ini, and/or C:\xampp\apache\bin\php.ini):

SMTP = smtp.gmail.com
smtp_port = 587
sendmail_from = [your_gmail_username]@gmail.com]
sendmail_path = “:\”C:\xampp\sendmail\sendmail.exe\” -t”

Change your sendmail.ini to read as follows (again, usually C:\xampp\sendmail\sendmail.ini):

account Gmail
tls on
tls_certcheck off
host smtp.gmail.com
from [your_gmail_username]@gmail.com]
auth on
user [your_gmail_username]@gmail.com]
password [your_gmail_username]@gmail.com
port 587
account default : Gmail

Simple example test script to see that it worked:

<?php
$from_name = “yourName”;
$from_email = “whichEver@gmail.com”;
$headers = “From: $from_name <$from_email>”;
$body = “Hi, \nThis is a test mail from $from_name <$from_email>.”;
$subject = “Mail from my development environment”;
$to = “yourUserNameHere@gmail.com”;

if (mail($to, $subject, $body, $headers)) {
echo “success!”;
} else {
echo “fail…”;
}
?>