|
||||||
| PHP Forum Use this forum to discuss all aspects of PHP Development. PHP is a server-side, cross-platform, HTML embedded scripting language that lets you create dynamic web pages. |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|||||
|
This one should be easy to explain.
When I type in http:/ /google.com (without the space), here, on code call, it comes out as Google.. whats the code to take the name of the page, not the URL? after some thought, im gonna take a shot in the dark. you use the readfile command to read the source of the file then use preg match to get whatever is between the <title></title> tags then echo it? Tried these PHP Code:
PHP Code:
Last edited by John; 05-12-2008 at 12:53 PM. |
| Sponsored Links |
|
|
|
|||||
|
You have the concept correct, just need to work on your code a bit.
__________________
CodeCall Blog | CodeCall Wiki | Shareware Site | Linux Forum | Write a Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||||
|
PHP Code:
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||||
|
What does the function preg_match() do? Does this mean you have to download the entire webpage before you can extract the title?
|
| Sponsored Links |
|
|
|
|||||
|
Quote:
working on my new proxy. test The first AnalyzeThatHost sets Analyze That Host as a variable, then searches for the title, and searches for the shortcut icon, and if it has one, it uses it as the image.. not too bad? |
|
|||||
|
preg_match is a function to parse content using a regular expression. It can be used to parse websites (html) or plain text documents.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
|
|||||
|
There's no faster way to do it.
__________________
CodeCall Blog | CodeCall Wiki | Shareware | Linux Forum | My Blog Chat with other CodeCall members on IRC; connect to irc.codecall.net and join #codecall |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Java:Tutorial - Tic-Tac-Toe | John | Java Tutorials | 25 | 02-27-2008 06:41 PM |
| Top 10 Ways To Promote Your Web Site | ravs2k6 | Marketing | 30 | 02-02-2008 04:20 AM |
| Operators | clookid | PHP Tutorials | 1 | 01-11-2007 08:35 PM |
| Online RPG For Sale - Predicted PR 5 | phb50530 | Site Reviews | 10 | 01-10-2007 05:59 AM |