Re: How to get /post a url in PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



sorin morosanu wrote:

>to extract link from page use a regular expression
>get page into a string using curl  http://ro.php.net/manual/en/ref.curl.php and after that use preg_match_all
> 
>somethig like that:
> 
>preg_match_all("/([hHrReEfF]+)=(\")*([^\"]+)(\")*(.*)>/", $string, $array);
> 
>I am not sure if is ok but you could try.
> 
>sorin
>
    I think that would match the follow string, which isn't an URL:

    FFFFFreffffhrhrrehehfhfr="""""""j""""""jksdlkfjsd>

    I think this might work better: "/[hH][rR][eE][fF]=\"([^\"]+)\"/"

    - Nebu


PHP Data object relational mapping generator - http://www.meta-language.net/ 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-objects/

<*> To unsubscribe from this group, send an email to:
    php-objects-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 




[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux