Get Remote Page Title - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Get Remote Page Title (/showthread.php?tid=19743) |
Get Remote Page Title - El Forum - 06-17-2009 [eluser]Dregond Rahl[/eluser] Does this method seem effective? Anything I can do to improve it? I only need the title. Code: function _get_page_title($url) Get Remote Page Title - El Forum - 06-17-2009 [eluser]Wuushu[/eluser] Hi, if you're going to use the data for display, it's always best practice to save the data to file/db/whatever so that on second+ lookups, you will not have to hit whoever's server it is that you're hitting - again. Just my 0.02 Get Remote Page Title - El Forum - 06-17-2009 [eluser]Dregond Rahl[/eluser] Yeah its stored in a database, this is just the getting function =] Get Remote Page Title - El Forum - 06-17-2009 [eluser]OES[/eluser] Hi Not sure if you still need this but I just posted on my blog a helper for Screen Scrapping. Would make your code alot less thanks to simple html dom :-). Check it out. Get Remote Page Title - El Forum - 06-18-2009 [eluser]Dregond Rahl[/eluser] [quote author="OES" date="1245303409"]Hi Not sure if you still need this but I just posted on my blog a helper for Screen Scrapping. Would make your code alot less thanks to simple html dom :-). Check it out.[/quote] Thanks for this =], the reason why i used cURL was because my test sever is shared so it doesn't support URL file access, does Simple HTML DOM work still ? Thanks, this might be useful for when i move to my real server. Get Remote Page Title - El Forum - 06-18-2009 [eluser]cahva[/eluser] Funny that they let you use curl but not URL file access. Curl extension has had more holes than a swiz-cheese Forbidding url access with include,require etc. is perfectly understandable but when using file_get_contents, fopen etc. it really is not necessary. Get Remote Page Title - El Forum - 06-18-2009 [eluser]Phil Sturgeon[/eluser] One interesting option that I have never found time to look at is htmlSQL. Theoretically this could be made into a DB driver for using limited ActiveRecord on XML. Wouldn't that be fun! |