werushka Posted February 1, 2009 Share Posted February 1, 2009 I need to make a script that searches specific sites for a person name ex "Tom Hanks" and gets how many articles or discussions there are on those sites in a time frame. Results: Searched for "Tom Hanks", there were approximately 1200 articles or discussions created between Feb 2/Feb9, 2009. in the following sites (Site 1) (Site 2). I would really appreciate heads up on this. Would it be also possible to use google to search specific sites for specific words during a given time frame. Maybe a syntax. This will be a challenge for me Quote Link to comment https://forums.phpfreaks.com/topic/143364-need-help-for-an-algorithm/ Share on other sites More sharing options...
MadTechie Posted February 1, 2009 Share Posted February 1, 2009 So search 'www.imdb.com' for 'tom hanks' in the last Year you could do this: http://www.google.co.uk/search?as_epq=tom+hanks&ft=i&as_sitesearch=www.imdb.com&as_qdr=y to search for a date range, Well Google offers some options regarding the date when a page was updated, but they are pretty fuzzy: you can restrict the results to pages updated in the past 3, 6, or 12 months. There's also a daterange operator, with the syntax daterange:startdate-enddate. Unfortunately, the dates must be entered as Julian dates (the Julian date is calculated as the number of days since January 1, 4713 BC). Hope that helps Quote Link to comment https://forums.phpfreaks.com/topic/143364-need-help-for-an-algorithm/#findComment-751940 Share on other sites More sharing options...
werushka Posted February 1, 2009 Author Share Posted February 1, 2009 ok. Is is possible to seach like 2 sites imdb.com and movies.com at the same time i tried like site:imdb.com, movies.com also I tried site:"imdb.com", "movies.com" but both of them didnt work Quote Link to comment https://forums.phpfreaks.com/topic/143364-need-help-for-an-algorithm/#findComment-751991 Share on other sites More sharing options...
MadTechie Posted February 1, 2009 Share Posted February 1, 2009 Humm..not sure i don't think so Quote Link to comment https://forums.phpfreaks.com/topic/143364-need-help-for-an-algorithm/#findComment-752002 Share on other sites More sharing options...
Ayon Posted February 1, 2009 Share Posted February 1, 2009 maybe something like this function SearchMovieDb($keyword) { $keyword = str_replace(" ","+",$keyword); $content[0] = "http://www.imdb.com/find?s=all&q=$keyword"; $content[1] = "http://www.fandango.com/GlobalSearch.aspx?wssac=131&tab=Movies+People&q=$keyword&wssaffid=11828_MoviesDotCom&repos=People"; $imdb = file_get_contents($content[0]); $movies = file_get_contents($content[1]); } i might have missunderstood your question completely tho... Quote Link to comment https://forums.phpfreaks.com/topic/143364-need-help-for-an-algorithm/#findComment-752179 Share on other sites More sharing options...
werushka Posted February 2, 2009 Author Share Posted February 2, 2009 Thanks avon for the feedback...I rather make thing simple. Finally I have decided that I will choose google as they do the best in indexing. I have made a search query as follows allintext: "Jan,28 2009" | "28 Jan 2009" | 28 Jan 2009" |"1/28/2009" | "1/28/09" | "1/28/2009" | "1.28.2009" | "2.2.2009" "Tom Hanks" site:imdb.com this query pretty much gets the result for tom hanks in imdb for that specific date...The query is not perfect and can be narrowed. I need to make a script or some sort that sums the total number of links that Google finds for the above query and store in a database. I would appreciate some feedback. Quote Link to comment https://forums.phpfreaks.com/topic/143364-need-help-for-an-algorithm/#findComment-752515 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.