• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

[ASK] HOW about cURL

JOKOWI-BODO

Member
Banned User
May 22, 2020
34
24
8
Hi All, i want to ask about cURL in PHP.

how can i use https://photos.app.goo.gl/C7Rv3EbKjyq32oKA8

will GET link in text. Like this link https://photos.google.com/share/AF1...?key=c2lUUUNsQlpnbk5ZajlZRFp1MFFxRFo3QnNtQjZB

PHP:
<?php
class cURL {
function get($url) {
        $process = curl_init($url);
        curl_setopt($process, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36');
        curl_setopt($process, CURLOPT_TIMEOUT, 60);
        curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($process, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($process, CURLOPT_SSL_VERIFYHOST, 2);
        $return = curl_exec($process);
        curl_close($process);
        return $return;
    }
}
$link='https://photos.app.goo.gl/C7Rv3EbKjyq32oKA8';
$curl = new cURL();
$Source = $curl->get($link);
echo $Source;
?>

code above is execute if i open file *.php
i just need link text
Code:
https://photos.google.com/share/AF1QipMzQ6rOgZdsM0O7_68pxVqBLd3RIDCFXYxZhP_EgrGWt5a8ohgVfwL1bz2HJ4YU4w/photo/AF1QipN6Q_ofiK5UBHgmMlPzsWB760E6ofYDu0v4M0rr?key=c2lUUUNsQlpnbk5ZajlZRFp1MFFxRFo3QnNtQjZB
 
Last edited:
I suppose it's used in an app connected to firebase.
I don't totally get your question. What exactly do you want to ask? Please rephrase.

On the other hand:
If you are the developer of this app, ensure that your Dynamic Links domain is correctly configured and that the path component of this URL is valid.
 
  • Like
Reactions: JOKOWI-BODO
Hi All, i want to ask about cURL in PHP.

how can i use https://photos.app.goo.gl/C7Rv3EbKjyq32oKA8

will GET link in text. Like this link https://photos.google.com/share/AF1...?key=c2lUUUNsQlpnbk5ZajlZRFp1MFFxRFo3QnNtQjZB

PHP:
<?php
class cURL {
function get($url) {
        $process = curl_init($url);
        curl_setopt($process, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36');
        curl_setopt($process, CURLOPT_TIMEOUT, 60);
        curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($process, CURLOPT_SSL_VERIFYPEER, FALSE);
        curl_setopt($process, CURLOPT_SSL_VERIFYHOST, 2);
        $return = curl_exec($process);
        curl_close($process);
        return $return;
    }
}
$link='https://photos.app.goo.gl/C7Rv3EbKjyq32oKA8';
$curl = new cURL();
$Source = $curl->get($link);
echo $Source;
?>

code above is execute if i open file *.php
i just need link text
Code:
https://photos.google.com/share/AF1QipMzQ6rOgZdsM0O7_68pxVqBLd3RIDCFXYxZhP_EgrGWt5a8ohgVfwL1bz2HJ4YU4w/photo/AF1QipN6Q_ofiK5UBHgmMlPzsWB760E6ofYDu0v4M0rr?key=c2lUUUNsQlpnbk5ZajlZRFp1MFFxRFo3QnNtQjZB
like this ? very easy to do
1.png
 
  • Love
Reactions: JOKOWI-BODO
Yes Sir, could you share code for it?
sure, but maybe this code still needs improvement.
PHP:
<?php
class cURL
{
    function get($url, $opt = '')
    {

        $process = curl_init($url);
        curl_setopt($process, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36');
        curl_setopt($process, CURLOPT_TIMEOUT, 60);
        curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($process, CURLOPT_SSL_VERIFYHOST, 2);
        $return = curl_exec($process);
        $getlink = curl_getinfo($process, CURLINFO_EFFECTIVE_URL);
        curl_close($process);
        
        if ($opt == 'getlink'){
            return $getlink;
        }else{
            return $return;
        }
    }
}

$link = 'https://photos.app.goo.gl/C7Rv3EbKjyq32oKA8';
$curl = new cURL();
$Source = $curl->get($link);
$query = $curl->get($link, 'getlink');

preg_match_all('/AF_initDataCallback[({](.*?)[})];/s', $Source, $output);
if (!empty($output[1][0]))
{
    preg_match_all('/(?<=\[").*?(?=",\["https:)/', $output[1][0], $output2);

    if (!empty($output2[0]))
    {
        $bt = strstr($query, '?');
        $af = strstr($query, '?', true);

        foreach ($output2[0] as $idlink)
        {
            if (empty($idlink))
            {
                continue;
            }
            $newlink = $af . '/photo/' . $idlink . $bt . '<br><br>';
            echo $newlink;
        }
    }else{
        echo 'No Link';
    }
}
else{
    echo 'No Data';
}
?>
*btw elu indo ngomong bhs indo aja elah, ribet bhs inggris cuk kwkwkkw
 
Last edited:
sure, but maybe this code still needs improvement.
PHP:
<?php
class cURL
{
    function get($url, $opt = '')
    {

        $process = curl_init($url);
        curl_setopt($process, CURLOPT_USERAGENT, 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/56.0.2924.87 Safari/537.36');
        curl_setopt($process, CURLOPT_TIMEOUT, 60);
        curl_setopt($process, CURLOPT_RETURNTRANSFER, 1);
        curl_setopt($process, CURLOPT_FOLLOWLOCATION, 1);
        curl_setopt($process, CURLOPT_SSL_VERIFYPEER, false);
        curl_setopt($process, CURLOPT_SSL_VERIFYHOST, 2);
        $return = curl_exec($process);
        $getlink = curl_getinfo($process, CURLINFO_EFFECTIVE_URL);
        curl_close($process);
       
        if ($opt == 'getlink'){
            return $getlink;
        }else{
            return $return;
        }
    }
}

$link = 'https://photos.app.goo.gl/C7Rv3EbKjyq32oKA8';
$curl = new cURL();
$Source = $curl->get($link);
$query = $curl->get($link, 'getlink');

preg_match_all('/AF_initDataCallback[({](.*?)[})];/s', $Source, $output);
if (!empty($output[1][0]))
{
    preg_match_all('/(?<=\[").*?(?=",\["https:)/', $output[1][0], $output2);

    if (!empty($output2[0]))
    {
        $bt = strstr($query, '?');
        $af = strstr($query, '?', true);

        foreach ($output2[0] as $idlink)
        {
            if (empty($idlink))
            {
                continue;
            }
            $newlink = $af . '/photo/' . $idlink . $bt . '<br><br>';
            echo $newlink;
        }
    }else{
        echo 'No Link';
    }
}
else{
    echo 'No Data';
}
?>
*btw elu indo ngomong bhs indo aja elah, ribet bhs inggris cuk kwkwkkw
Tq berat bro..
hahaha...
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock