Need help.
Moderator: General Moderators
Need help.
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.
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.
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.
thanks, I'll try your suggestions in the AM, i appreciate it.