Jump to content

rishiraj

Members
  • Posts

    37
  • Joined

  • Last visited

    Never

About rishiraj

  • Birthday 07/05/1986

Contact Methods

  • Website URL
    http://www.rishirajsingh.info
  • Yahoo
    rishi_mum1985

Profile Information

  • Gender
    Male
  • Location
    Mumbai, India

rishiraj's Achievements

Member

Member (2/5)

0

Reputation

  1. I am using regex buddy its quite good but lacks in testing bigger data. I need some kind of software that can help me developing regex and testing in on some test data before adding to any script.
  2. What is the best software for regex that can save lots of time in debugging and checking the code. I have little bit knowledge of regex and want to test bigger expressions. please give your reviews. Here are few I have found on net. RegexBuddy by JGsoft - Just Great Software (trial version for free) PatternHelper by DataMystic GridinSoft Notepad by GridinSoft
  3. its solved now, thanks to my netpal jason. $pattern = '#<a id=[a-z0-9]+ href=\S+&(?:adurl|q)=(.*)[%&](?:.*)>(.*)[/url]</font>(.*)<span class=a>(.*)</span>#Ums'; Hope it is the right way.
  4. I am beginner to regex, can I start directly with 3rd version or I should first read the basics from other version.
  5. Just need a slight change to make it applicable for this statement also $pattern = '#<a id=[a-z0-9]+ href=\S+&(?:adurl|q)=(.*)%(?:.*)>(.*)</a></font>(.*)<span class=a>(.*)</span>#Ums'; <a id=an5 href=/url?sa=L&ai=BIPYDqoBJaA&num=5&q=http://www.inetdomain.eu/internet_marketing.html&usg=AFQjCNF4pAmujdfbWbPUuYeGoADPQ0kMnQ>Internet <b>Marketing</b></a></font><br>Promote your business online,<br>increase your visibility<br><span class=a>www.INetDomain.Eu</span> I am doing this way $my_pattern = '#<a id=[a-z0-9]+ href=\S+&(?:adurl|q)=(.*)(%|&usg)(?:.*)>(.*)</a></font>(.*)<span class=a>(.*)</span>#Ums';
  6. Thanks a lot derwert, your expression is matching perfectly for <a id=an5 href=/pagead/iclk?sa=l&ai=Bjt-Pnum=8&adurl=http://www.westhost.com/package-compare.html%3FDgoo-gene> $3.95 <b>Web Hosting</b></a></font> VPS, Huge Disk Space and Bandwidth! Fall Special ends soon... <span class=a>www.westhost.com</span> But since there are little change in seocond one like instead of href=/pagead => href=/url and instead of &adurl => &q <a id=pa3 href=/url?sa=L&ai=B0MF0&q=http://www.3ix.com/%3Fso onmouseover="return true"> 2GB <b>Web Hosting</b> $1/Rs.40</a> <font size=-1><span class=a>www.3ix.in</span> I am changing your expression from $pattern = '#<a id=[a-z0-9]+ href=/(pagead|url)(?:.*)&(adurl|q)=(.*)%(?:.*)>(.*)</a></font>(.*)<span class=a>(.*)</span>#Ums'; preg_match_all($pattern, $data, $matches); print_r($matches); But its not working. please help.
  7. I need regular expression to get the details <a id=an5 href=/pagead/iclk?sa=l&ai=Bjt-Pnum=8&adurl=http://www.westhost.com/package-compare.html%3FDgoo-gene> $3.95 <b>Web Hosting</b></a></font> VPS, Huge Disk Space and Bandwidth! Fall Special ends soon... <span class=a>www.westhost.com</span> <a id=pa3 href=/url?sa=L&ai=B0MF0&q=http://www.3ix.com/%3Fso onmouseover="return true"> 2GB <b>Web Hosting</b> $1/Rs.40</a> <font size=-1><span class=a>www.3ix.in</span> I have only above two type of code in my document. and I want to extract following data from it. Example: exact url: http://www.westhost.com/package-compare.html Title: $3.95 Web Hosting Description : VPS, Huge Disk Space and Bandwidth! Fall Special ends soon... Domain: www.westhost.com I can make some kinda logic but cant make exact regular expression <a id=(an|pa)[0-9] href=/[^&q|&adurl] (&q|&adurl)=$exacturl%[^ ]> $title [/url] <span>$Domain </span>$description </font> I need regular expression to parse this data from my html code. with regular expression I can use preg_match_all to get the data. P.S. - For any reference one can refer http://www.google.com/search?hl=en&q...=Google+Search From here i got the HTML code. Exact url is ended at % sign. Thanks for any kind of help
  8. I need regular expression to get the details Code: <a id=an5 href=/pagead/iclk?sa=l&ai=Bjt-Pnum=8&adurl=http://www.westhost.com/package-compare.html%3FDgoo-gene> $3.95 <b>Web Hosting</b></a></font><br>VPS, Huge Disk Space and Bandwidth!<br> Fall Special ends soon...<br><span class=a>www.westhost.com</span> <a id=pa3 href=/url?sa=L&ai=B0MF0&q=http://www.3ix.com/%3Fso onmouseover="return true"> 2GB <b>Web Hosting</b> $1/Rs.40</a><br> <font size=-1><span class=a>www.3ix.in</span> I have only above two type of code in my document. and I want to extract following data from it. Example: exact url: http://www.westhost.com/package-compare.html Title: $3.95 Web Hosting Description : VPS, Huge Disk Space and Bandwidth! Fall Special ends soon... Domain: www.westhost.com I can make some kinda logic but cant make exact regular expression <a id=(an|pa)[0-9] href=/[^&q|&adurl] (&q|&adurl)=$exacturl%[^ ]> $title </a> <span>$Domain </span>$description </font> I need regular expression to parse this data from my html code. with regular expression I can use preg_match_all to get the data. P.S. - For any reference one can refer http://www.google.com/search?hl=en&q...=Google+Search From here i got the HTML code. Exact url is ended at % sign. Thanks for any kind of help
  9. I just need some snippets of code, rest i can do by myself.
  10. Dude its not click fraud, I work for a SEM company that wants to check the competitiors for particular keyword before bidding so it can bid wisely. These tool will be use to find the competitor for particular keyword and what are the keywords the competitor is bidding for. If you need further explanation PM me.
  11. I am using curl to open Google search page $filelocation="http://www.google.com/search?q=cellphone&ie=utf-8&oe=utf-8&aq=t&rls=org.mozilla:en-US:official&client=firefox-a $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $filelocation); curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); $html=curl_exec ($ch); curl_close ($ch); Now I want all the sponsored results to get in php variable from $html, like $title[0]="Cell phone" //ad title $adurl[0]="http://www.unfoundation.org/vodafone/index.asp" // ad url is appended after href=/url?sa or href=/pagead/iclk?sa $addescription[0]="Improving telecommunications to help in times of disaster." $displayurl[0]="www.UNFoundation.org/vodafone" I am not able to parse ad data from html code ( because I can't write regex-regular expression for that) I need some kind of help in writing regex to parse ad data from html code. I can pay for it. P.S. - Google sponsored results are at top or right of natural results.
  12. Initially I have tried that but didn't find Google Ajax search api helpful in getting sponsored results. As Ajax search based on JavaScript so I never get the HTML code for sponsored results. So I didn't find any way to get the sponsored result, because when i view source there is not code for search result. If there is anyway to get the sponsored result code from Google Ajax search let me know.
  13. I want to make a crawler in php that will crawl google search results for given keywords. Procedure will be something like this 1. There will be a list of thousands keywords in file with csv or other format. 2. Crawler will crawl google.co.in for each keywords in the file. 3. Top 10 results title, description and the url will be collected and stored in MySQL database. 4. Now crawler will crawl for next keyword after some delay and loop will go on unless reach to daily limit of keywords to crawl. Then next day it will start again. I need some suggestion on 1. How to crawl pages without using any addons. (Because I am going to run this from an free server not my machine so I will only have php, mysql and general features. ) 2. What kind of parsing I should use to extract title, description and urls from HTML code. 3. What should be the delay and daily crawl limit. ( I don't want to get banned by google for automatic query. ) I will be really thankful for any kind of help. Link to some kind of article most welcome.
  14. I think it can be done by finding server headers. I want to have something like this for my users http://www.seovalley.com/seo-tools/server-header-checker.htm http://www.seovalley.com/seo-tools/ip-address-checker.htm http://www.seovalley.com/seo-tools/hosting-server-type-checker.htm but i am not able to find any script for this, I am not even getting clue how to start? thanks
×
×
  • 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.