- May 22, 2020
- 39
- 25
- 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
code above is execute if i open file *.php
i just need link text
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: