Posts Tagged ‘PHP’
[HOW TO]: Know the real username of a user in SMF(Simple machine Forum)real username
SMF is a PHP based forum(Community board) which has been used widely. I am going to teach you how to get the real username of a user or many users. First go and register in a SMF forum. Then goto the profile page of the user of whom the username you want to know. After that click on “PM(Private Message)” and then in the “To:” section you get the real username of the certain user.
You can also get the username of different users at once by “Composing” the new message and then “Click find user” and find the user by the current fake name and you get the real name of the user. By this you can get the real username of a person on the Forum that you wanted.
This trick may work at other free PHP discussion board like phpbb, vBulletine and more.
Please forgive me for my poor english.
[HOW TO]: Fetch a certain part of HTML, Text or PHP From Outer Source With PHP
I am going to teach you how to fetch certain part of HTML, Text or PHP for any outer source(i.e. From a website). Please read all the contents clearly. You most have a problem to fetching a certain part of HTML or PHP because Text files are more easy to handle. We here do not fetch the PHP code but we fetch the HTML code after the code is published in a website. Those code are HTML codes most and your can easily view in the source. But the main problem with the user are they cannot fetch the code although all the code is found to be correct. The code that I use is given below:
<?php
$contents = file_get_contents(‘http://www.example.com’);
$term_search=”The term to be searched”;
$no_term=1000;
$pos=strpos($contents, $term_search);
$pos += strlen($term_search);
$new_pos = substr($contents,$pos,$no_term);
echo $new_pos;
?>