Jump to content

Recommended Posts

I am very new with PHP but am working on a url shortener program (in PHP) that I am trying to get to be able to place in the mata tag of the frame the keywords of the page it is redirecting so that any context-sensitive advertising and such on the frame will pull appropriate ads... I have some code snippets and such I am trying to figure out but essentially trying to get about the first 1000 characters of the referring page's keywords extracted and then cached so as to reduce server load, and then posted in the meta tag area of the framed area.

 

I dont know how to call the keyword script from the frame page, or really how to set it up to cache what data it extracts...

 

Any help at all in getting me on the right path is most appreciated!!!

 

Thanks!

Link to comment
https://forums.phpfreaks.com/topic/187471-keyword-extraction-and-echo/
Share on other sites

If you are doing a URL shortening service, I take it that you are storing each item in the database. If so the cache is easy, add a column to the database for description then when the user submits their page you can fetch the pages infromation using either cURL or file_get_contents and parse it with preg_match for the meta tags and grab the data you need and store it in that column.

 

Hope that helps.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.