Activity Stream
48,167 MEMBERS
6800 ONLINE
besthostingforums On YouTube Subscribe to our Newsletter besthostingforums On Twitter besthostingforums On Facebook besthostingforums On facebook groups

Page 6 of 7 FirstFirst ... 4567 LastLast
Results 51 to 60 of 67
  1.     
    #51
    Member
    Thanks I understand better but i stumble a bit on preg_match command I read about it and I cant seem how people manage to get the right stuff out weird symbol that make no sense to me
    PHP Code: 
     preg_match('#\[IMG\](.*)\[\/IMG\]#'$data$matches); 


    This what I don't understand much #\[IMG\](.*)\[\/IMG\]# what is all the simple telling what to search can you break it down to me explain what those do? like # is and / is and other symbol I manage to learn ^ start line and $ endline ect

  2.     
    #52
    Member
    preg_match uses "Perl Compatible Regex library" so you have to search for Regex or regular expression in Google to find infos about it. It's a pretty powerful tool, worth to learn.

    '#\[IMG\](.*)\[\/IMG\]#' is the search pattern string

    # is the delimiter (it's on both sides of the string). You can use modifiers that are placed after the ending delimiter. For example '#\[IMG\](.*)\[\/IMG\]#i' for case-insensitive search (so both IMG and img match the pattern)

    \[IMG\] matches the string [IMG]. You have to escape [ and ] by a backslash because normally you use those to match a character set ([a-z] matches any letter, [a-zA-z0-9_] any alphanumeric character and underscore)

    . matches any character

    * means 0 or more times (if it wouldnt be there, in your case, it would only match a single character, like [IMG]a[/IMG] or [IMG]1[/IMG]...). In the place of * you can also use + for one or more times or {max,min} like {2,10} for min x, max y times.

    (.*) parentheses are used to capture a part of a pattern. $matches[0] will contain the whole matching string, $matches[1] the first captured part (between the first pair of parentheses), $matches[2] the second ...

    \/ - here the / is also escaped, I don't really know why, I think it would work without it. It should be escaped when the delimiter is not # but /.

  3.     
    #53
    Member
    and yeah, ^ matches starting of a line (or of the whole string, depending on modifiers), $ matches end of line/string.

  4.     
    #54
    Member
    thank for the help another thing is there a way to test the result of curl?

  5.     
    #55
    Member
    PHP Code: 
    $url='http://www.imdb.com/';

    $ch curl_init();
    curl_setopt($chCURLOPT_URL$url);
    $content curl_exec($ch);
    $info curl_getinfo($ch);
    curl_close($ch); 
    $content will contain the requested page

    http://php.net/manual/en/function.curl-exec.php
    http://php.net/manual/en/function.curl-getinfo.php

  6.   Sponsored Links

  7.     
    #56
    Member
    thank you very much sir

  8.     
    #57
    Too busy :|
    Website's:
    L337Fx.com BeastieBay.net
    Note:
    It'll take me more time to fix the grabbing error from IMDb.com since I use a pre-made class and until the original owner fixes it, I cannot do much. Till now I've figured out only to fix the 'Genres' data, rest is still to be fixed. So sorry for the delay.

  9.     
    #58
    Member
    Website's:
    wscripts.net damnlolscript.com lulzjet.com
    what you want to fix?

  10.     
    #59
    Member
    Website's:
    Swagger360.com
    link is down any other alternative

  11.     
    #60
    Member
    Website's:
    imdber.org justpaste.me
    ^You can try this one for the mean time.

Page 6 of 7 FirstFirst ... 4567 LastLast

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. IMDB Info Generator
    By saninokia in forum Web Development Area
    Replies: 20
    Last Post: 25th Aug 2012, 10:42 AM
  2. [Selling] IMDB Vbulletin Generator $15
    By nseiken in forum Marketplace (Buy, Sell and Trade)
    Replies: 18
    Last Post: 27th Apr 2012, 01:07 AM
  3. Full Featured IMDB Generator
    By JamesVaporH in forum Web Development Area
    Replies: 0
    Last Post: 21st Mar 2012, 09:12 PM
  4. vBulletin IMDB Info Generator
    By JMaldo in forum Completed Transactions
    Replies: 31
    Last Post: 30th Nov 2009, 09:05 AM

Tags for this Thread

BE SOCIAL