Page 1 of 1

Need help.

Posted: Sun Oct 18, 2009 5:04 pm
by hustle247
I am trying to have users enter a url for there social networks, then depending on the social network url entered, I am posting the stored image for that site on the user page. For example if they enter "Http://www.twitter.com/sample" it would post the twitter icon stored on my server image dir and post to the user profile next to the actual twitter url entered. I want the code to work so that it recognizes the url, posts the correct image, no matter what username is in the string of the url. Thanks in advance.

Re: Need help.

Posted: Sun Oct 18, 2009 6:07 pm
by Eric!
Well you could use parse_url and then match the host to your icons. http://php.net/manual/en/function.parse-url.php

Re: Need help.

Posted: Sun Oct 18, 2009 11:56 pm
by plezops
Another way would be to search the provided URL for a list of certain words, for example: 'facebook', 'twitter', etc. If you have a match use that image.

Re: Need help.

Posted: Mon Oct 19, 2009 2:57 am
by hustle247
thanks, I'll try your suggestions in the AM, i appreciate it.