Category : url

this is my redirect function protected function redirect ($url) { if (strpos($_SERVER["SERVER_PROTOCOL"] , "https") == true ) { $protocol = "https//"; } else { $protocol = "http//"; } header("Location:".$protocol.$_SERVER["HTTP_HOST"]."/php-project/".$url); } when i use this : $this->redirect("article"); this is my output in browser url : http://localhost/php-project/article/http//localhost/php-project/article it attached new url to last url Sourc..

Read more

I need to count hits (array items from url parsed page) <?php ini_set("display_errors", "1"); error_reporting(E_ALL); if(isset($_POST[‘userinput’])) { $output=""; $data=$_POST["userinput"]; $hashed=strtoupper(sha1($data)); $chars=substr($hashed, 0, 5); $url="https://api.pwnedpasswords.com/range/$chars"; $test=file($url); $lines_array=array($test); $hits_array=explode(" ","$test"); $hits=count("$hits_array"); // determin hits if($hits > 0){ $output="<center>This Password Has Been Found $hits Times,<br><b>So Do NOT Use This Password!!!</b>"; } else { $output="<center> Password Seems To Be ..

Read more

I have a link with a fragment idk how to get the values in url fragments…. My link is http://localhost/i-net/admin/dashboard#access_token=eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICJKbWVqYjdUcmJrWlo5UzFDSEhLS25oX0dhUThoTzlESE9WWktsWkFpczF3In0.eyJleHAiOjE2MjcwMzQxMzUsImlhdCI6MTYyNzAzMzIzNSwiYXV0aF90aW1lIjoxNjI3MDMzMjM1LCJqdGkiOiIwODk3NjgxMi0xMzM4LTRhOWMtOTMxMy1kY2NhMzIzZTVkMDkiLCJpc3MiOiJodHRwczovL2lkcC11YXQuaW5ldGNzYy5jb20vYXV0aC9yZWFsbXMvaW5ldGNzYyIsImF1ZCI6ImFjY291bnQiLCJzdWIiOiJjZTQ4Mzg5Zi0yMjQ0LTRkNWUtYWE1ZS0wZGEyNmVmZjdiZjAiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJpbmV0Y3NjIiwic2Vzc2lvbl9zdGF0ZSI6IjkzZmEwM2M1LTFjYjUtNDljMC1hY2QyLTI3NzRjYjIxYzQ3MyIsImFjciI6IjEiLCJhbGxvd2VkLW9yaWdpbnMiOlsiaHR0cHM6Ly90ZXN0LmluZXRjc2MuY29tLyJdLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsib2ZmbGluZV9hY2Nlc3MiLCJhZG1pbiIsInVtYV9hdXRob3JpemF0aW9uIiwidXNlciJdfSwicmVzb3VyY2VfYWNjZXNzIjp7ImluZXRjc2MiOnsicm9sZXMiOlsiYWRtaW4iLCJ1c2VyIl19LCJhY2NvdW50Ijp7InJvbGVzIjpbIm1hbmFnZS1hY2NvdW50IiwibWFuYWdlLWFjY291bnQtbGlua3MiLCJ2aWV3LXByb2ZpbGUiXX19LCJzY29wZSI6ImVtYWlsIHByb2ZpbGUiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmFtZSI6InVzZXIxIGxuYW1lMSIsInByZWZlcnJlZF91c2VybmFtZSI6InRua2FuMDAwMDAxIiwiZ2l2ZW5fbmFtZSI6InVzZXIxIiwiZmFtaWx5X25hbWUiOiJsbmFtZTEiLCJlbWFpbCI6InByaXRoaXZpcmFqQGluZXRjc2MuY29tIn0.GWgtB9_coCSA1MgTCvqQpX7-Hgtq5udDkN6CPdsdfdfdfWnnqJq3qI-S3g6K6J2NyjKC5xuUvkOo1qWV02q6_j1sgFGqpnmh6svjFJLExYP–P6m62WNl6m7oR3CKH-H4_uNamdPNdh3K1XwmoKGchBHRrXvanpko_15APpByPyA90ecStoi3IG3VKaM3odKiOxNs8LSfHwE67Hd-WxyA1JBfeMOgwWWeas9YTvrmB7vaalzMQqAHrNkKEF0OZ_WjN3GyX1TEOx1ZikFVAJdUExdiKC4pYpSVjnMv7BWaATd04DEsA9OAuF_ozgOpgFOxaseLvJQNIyar8XSTJJj45ioQmYcKA&token_type=Bearer&expires_in=900 Here I want to get the value of access_token, token_type and expires in datas. Sourc..

Read more

Currently I’m removing https:// and http:// with following code: $r=Input::get(‘searchQuery’); $Query = preg_replace( "#^[^:/.]*[:/]+#i", "", $r); $Query=rtrim($Query, "/"); I need to remove www. as well. What should I add to the code inorder to remove www. Eg: When I search for https://www.example.com/ It should only search for example.com Sourc..

Read more

A PayPal account can have different email addresses: each of them reserved for receiving specific donations. This allows the account owner to sort them easily, because he can export a CSV report and filter donations by the recepient email address chosen by each benefactor. To receive donations for a specific email address, I used to ..

Read more