Solved

Use PHP to scrape the google Adwords ads

Posted on 2009-06-29
9
647 Views
Last Modified: 2012-05-07
Hello,

I am developing a website, In which i have to scrape the google Adwords ads in PHP and For each ad, get the ad title, ad text, visible URL, and destination URL and  For each destination URL, get all the outgoing links

And i am clueless about this. So please advice.

Thanks in advance,
Priya
0
Comment
Question by:Priyadarshni
  • 5
  • 4
9 Comments
 
LVL 20

Expert Comment

by:edster9999
ID: 24734582
You call a script from the google site that embeds the text into the page.
If you call the same script again you will get different links so that doesn't work.
You'll need to call the script and then have the code to read the elements back in using DOM lookups.

What good would this do ?

If you are planning on altering the links in anyway or stopping some companies (competitors maybe) popping up on your site you will very quickly be banned from the google ads program - they do checks.
If it is just stopping your competitors there is an option for this in your admin pages.

0
 

Author Comment

by:Priyadarshni
ID: 24734674
Thank you for your reply.

Er... I might be asking a silly question, But How do I call that script? Where is it??

I am sorry, But this concept is new to me. So please help me out.
0
 
LVL 20

Expert Comment

by:edster9999
ID: 24734691
The script is included inline in the web page (by you).  You put it further down than the google advert and it will then run after it.
0
 

Author Comment

by:Priyadarshni
ID: 24734813
Can i get some documentation or an example for this?

I still dont know what script i shd include?
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:Priyadarshni
ID: 24742945
Hello Anybody there???
Help me out please...
0
 
LVL 20

Expert Comment

by:edster9999
ID: 24744111
Well you have not said what you want to do so it is pretty hard to write a script for you
0
 

Author Comment

by:Priyadarshni
ID: 24744442
I need a script to scrape the google Adwords ads in PHP for different keywords daily. Or atleast an idea how to do it...
0
 
LVL 20

Accepted Solution

by:
edster9999 earned 500 total points
ID: 24744635
If you can program then download the javascrip scripts that the google adverts pull in.
from memory it adds in html code to display the adverts in a div item something like this :
<div id="googleads">

If you copy the java script to your own server and run it from there instead you can play with what it does.

NOTE - If Google catch you doing this they will ban you even if it is not to defraud them

0
 

Author Closing Comment

by:Priyadarshni
ID: 31597832
I used the same method
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to count occurrences of each item in an array.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now