Forum Moderators: martinibuster

Message Too Old, No Replies

Adsense compatibility with PHP variable passing?

Which PHP method to use?

         

WildGoose

6:02 am on May 2, 2006 (gmt 0)

10+ Year Member



Though I'm not new to Adsense, I am relatively inexperienced. I'm building a new PHP-based site which will need to pass a variable from one page to the next. I'm just learning the basics of PHP right now.

I'm trying to decide which method to use for passing the variables: GET, which if I understand puts the variable values in the URLs, or POST, which does not. Either way, I expect that each page will have a unique URL. However, I do not plan for all pages to have text or image links; many of them will appear only after POSTing a form. My concern is that Google will not be able to spider it; is just posting an ad on such a page enough for Google to grab its content?

Does it make any difference which variable passing method I use for Adsense compatibility? I don't want to build the whole site and then end up with nothing but PSAs.

Thanks.

david_uk

6:06 am on May 2, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd try it with a few pages and see what happens. I'm not intp .php, but have a few .asp pages. I recently put an adlinks unit on a page that pulls text out of a database and what happened was that there were no ads on the first page load, but all subsequent loadings of that page had relevant adlinks topics on. So I guess once the page has been spidered it has relevant ads.

I don't know if GET or POST akes a difference. If the bot is using page content, then logically it shouldn't. I have a dynamically generated summary page that lists the articles, and clicking on each one is passed through the querystring EG

summary.asp?search=346

jurii

7:51 am on May 2, 2006 (gmt 0)

10+ Year Member



You're right WildGoose, Google won't spider any pages that it can't reach through an ordinary link. So the best advice is to build links.

I would prefer POST over GET, if this creates a new URL for the page. But avoid session ids or any other ids in the URL if possible. AFAIK Google doesn't spider any URL with id= in it.
The shorter the URL is the better.

If you use GET: index.php?xy=1 and index.php?xy=2 are clearly seen as different pages. But don't take too many parameters with you.

Jafo

12:22 pm on May 2, 2006 (gmt 0)

10+ Year Member



Actually GET would make more sense to Adsense than POST. GET resides totally in the URL. For example, in replying to this post, you see this in the URL:

[webmasterworld.com...]

Specifically:

edposts.cgi?action=reply&forum=89&discussion=13791

What comes after the? is the GET query. These Google can follow. When you POST to a form, the query is not located in the URL, but POSTed to the script/page in question.

You should not use passwords or other sensitive data in the GET query string.