8000 Html parser error even if the url is correct · Issue #16 · dusterio/link-preview · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
Html parser error even if the url is correct #16
Open
@adydevil

Description

@adydevil

Hello,

I have used link preview to fetch data as it was working well as i have some logical changes in my code due to requirement..previously i was checking through regular expression as if the so called text has link then with the help of preg_match i will retrieve it and it will parse to your function to get all info and after the logical changes in my code for the scenario if user will enter two urls if there text contains normal url and youtube url..

$fn_url="https://www.example.com";

if($fn_url != "")
{
$previewClient = new Client($fn_url);
$preview = $previewClient->getPreview('general');
$preview = $preview->toArray();

}

if i pass variable in new Client it throwing me error all the time and if i passed the same value as static string then it is giving output with so called info in array.previously it was working well
as the code was like..and it was working well..

if(preg_match(($reg_exUrl,$text,$match))
{
$previewClient = new Client($match[0]);

            $preview = $previewClient->getPreview('general');
            $preview = $preview->toArray();

}

so please guide me if i am making any mistake..
if it can be implemented in laravel 5.4 can i get example for it..

Thanks in advance

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0