Results 1 to 6 of 6

Thread: Help with text grabing.

  1. #1
    Junior Member
    Join Date
    Jun 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Help with text grabing.

    Sir, I am very new in php. Please help me about this. Suppose any visitor submited fb.com/xxx in input box. now how can I grab xxx in next page without fb.com? I think it will very easy for senior member. But hard to me. Please somebody help. At least give me a hints.

  2. #2
    Senior Member Ghost's Avatar
    Join Date
    Jan 2007
    Location
    Cardiff, Wales
    Posts
    295
    Thanks
    12
    Thanked 138 Times in 37 Posts
    Rep Power
    0

    Default

    PHP Code:
    //users post example
    $post 'fb.com/sometext';

    //here we remove what we dont want
    //str_replace('THE TEXT YOU DONT WANT', 'TEXT YOU DO WANT(OR)LEAVE BLANK', $post);
    $post str_replace('fb.com/'''$post);

    //here we show new result which should display
    //sometext
    echo $post;
    //
    //
    //
    // 
    Last edited by Ghost; 15-07-12 at 07:39. Reason: TO MAKE PHP CODE BOX BIGGER (STUPID BOX LOL)
    <?php
    include ('Ghost');
    if ($Post == true) {
    echo '


    alt='coding-talk.com!!' />';
    echo 'Sharing Is Caring!';
    } else {
    echo '

    alt='the username GHOST has been comprimised!' />';
    echo 'OMG SOMEBODY HELP ME!!';
    }
    ?>

  3. #3
    Member
    Join Date
    Nov 2010
    Posts
    45
    Thanks
    0
    Thanked 23 Times in 6 Posts
    Rep Power
    0

    Default

    maybe this will help

    PHP Code:
    <?php
    $var 
    parse_url("http://fb.com/xxx?q=pov");

    print_r($var); // Array ( [scheme] => http [host] => fb.com [path] => /xxx [query] => q=pov )

  4. #4
    Member
    Join Date
    Nov 2010
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    3

    Default

    tanx it helpful. but what if a user insert "Ghost Vinay" as a name and i want to get the last surname how do i go about that?

    Added after 10 minutes:

    2) what if u want to get the last 3 letters of a word, eg "GHOST" and i want to get only the "OST" and/or the first 2 words also eg "GH"
    Last edited by Wintch; 17-07-12 at 02:39.

  5. #5
    Senior Member
    Join Date
    Jan 2011
    Posts
    113
    Thanks
    9
    Thanked 2 Times in 2 Posts
    Rep Power
    3

    Default

    Quote Originally Posted by Wintch [Only registered and activated users can see links. Click Here To Register...]
    2) what if u want to get the last 3 letters of a word, eg "GHOST" and i want to get only the "OST" and/or the first 2 words also eg "GH"
    I think this is just the thing u wanted: [Only registered and activated users can see links. Click Here To Register...]

    PHP Code:
    <?php
    $rest 
    substr("ghost", -1);    // returns "t"
    $rest substr("ghost", -2);    // returns "st"
    $rest substr("ghost", -31); // returns "o"
    ?>

  6. #6
    Member
    Join Date
    Nov 2010
    Posts
    68
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    3

    Default

    tanx man, it help

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Edit Text Using PHP problem
    By Sifat3d in forum Coding Forum
    Replies: 3
    Last Post: 06-11-11, 06:20
  2. How to Prevent my FILES from CRAWLING/GRABING files.?
    By rocket101 in forum Server Management
    Replies: 0
    Last Post: 18-10-11, 02:39
  3. Text to speech
    By pmbguy in forum Scripts Forum
    Replies: 8
    Last Post: 22-11-10, 19:50
  4. Text to MP3
    By centi in forum Coding Forum
    Replies: 2
    Last Post: 02-03-10, 10:20
  5. Chatroom Text error
    By riderz in forum Site / Script testing and error fixing
    Replies: 1
    Last Post: 11-02-10, 04:43

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

SEO by vBSEO

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19