<?php

function cURLops ( $method, $SSL, $url, $data, $headers )
{
    $ch = curl_init();
    curl_setopt ( $ch, CURLOPT_URL, $url );
	curl_setopt ( $ch, CURLOPT_CONNECTTIMEOUT, 5 ); // 5 saniye boyunca bağlantı kuralmaması durumunda bağlantıyı kes
    curl_setopt ( $ch, CURLOPT_HEADER, TRUE );
	
    if ( $method == "GET" )
    {
        curl_setopt ( $ch, CURLOPT_POST, FALSE );
        curl_setopt ( $ch, CURLOPT_FRESH_CONNECT, TRUE );
        curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, TRUE );
        curl_setopt ( $ch, CURLOPT_HTTPHEADER, $headers );
    }
    else if ( $method == "POST" )
    {
        curl_setopt ( $ch, CURLOPT_POST, TRUE );
        curl_setopt ( $ch, CURLOPT_POSTFIELDS, $data );
        curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, TRUE );
        curl_setopt ( $ch, CURLOPT_HTTPHEADER, $headers );
    }
    else
    {
        curl_setopt ( $ch, CURLOPT_CUSTOMREQUEST, $method );
        curl_setopt ( $ch, CURLOPT_FRESH_CONNECT, TRUE );
        curl_setopt ( $ch, CURLOPT_RETURNTRANSFER, TRUE );
        curl_setopt ( $ch, CURLOPT_HTTPHEADER, $headers );
    }
	
    // SSL sertifikasını devre dışı bırakmak için bu alan kullanıyor curl.exe de -k parameteresine denk
    if ( $SSL == FALSE )
    {
        curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );
        curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, FALSE );
    }
    else
    {
        curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, TRUE );
        curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, TRUE );
    }
	
	$response = curl_exec ( $ch );
      
    if( $response == NULL )
    {
		return json_encode
		(
			array
			(
				"Response"=>"Error",
				"MSG"=>"Error: " . curl_error ( $ch ) . " - Code: " . curl_errno ( $ch )
			)
		);
    }
    else
    {
		return json_encode
		(
			array
			(
				"Header"=>HeaderFormater ( substr ( $response, 0, curl_getinfo ( $ch, CURLINFO_HEADER_SIZE ) ) ),
				"Response"=> json_decode ( substr ( $response, curl_getinfo ( $ch, CURLINFO_HEADER_SIZE ) ) )
			)
		);
    }
	
	curl_close ( $ch );
}

function HeaderFormater ( $headerText )
{
      $headers = array();
      $lines = explode ( "\n", $headerText );

      foreach ( $lines as $line )
      {
            if ( trim ( $line ) === '' )
            {
                  continue;
            }
            if ( preg_match ( '/^HTTP\/\d+\.\d+\s+\d+\s+.+$/', $line ) )
            {
                  // Status line, ignore
                  continue;
            }
            
            $parts = explode ( ':', $line, 2 );
            
            if ( count ( $parts ) < 2 )
            {
                  continue;
            }

            list ( $key, $value ) = explode ( ':', $line, 2 );
            
            if ( $key === NULL OR $value === NULL )
            {
                  continue;
            }
            
            $headers[ trim ( $key ) ] = trim ( $value );
      }
      
      $parsedHeadersObj = (object) $headers;
      
      return $parsedHeadersObj;
}


$LoginStatus = json_decode 
(
	cURLops 
	(
		"POST",
		FALSE,
		"https://durukanbal.com/api/token", 
		json_encode 
		(
			array
			(
				"email"=>"Username",
				"password"=>"şifres123"
			)
		),
		array
		(
			'accept: application/json',
			'Content-Type: application/json'
		)
	)
);

print_r( $LoginStatus );

?>
Categories: PHP language

1,515 Comments

Unknown · 26/01/2024 at 17:29

What’s up to all, how is the whole thing, I think every one is getting more from
this web site, and your views are good for new visitors.

Unknown · 26/01/2024 at 17:46

Appreciation to my father who shared with me regarding this website,
this blog is in fact amazing.

[https://forumbb17.ornop.org forum lendir bb17 · 26/01/2024 at 18:04

My brother suggested I might like this website.
He was entirely right. This post truly made my day.
You cann’t imagine simply how much time I had spent for this info!

Thanks!

[https://lendir69.ornop.org lendir forum bokep · 26/01/2024 at 18:23

I’m gone to inform my little brother, that he should also go
to see this website on regular basis to obtain updated from hottest news.

Unknown · 26/01/2024 at 18:29

Outstanding quest there. What occurred after? Good luck!

bokep indo · 26/01/2024 at 18:50

An intriguing discussion is worth comment. I do think that you ought to publish more
on this issue, it might not be a taboo subject but usually people don’t speak about such topics.
To the next! All the best!!

https://gocrot.ornop.org · 26/01/2024 at 19:09

Hi are using WordPress for your site platform?
I’m new to the blog world but I’m trying to get started and
set up my own. Do you need any coding knowledge to make your own blog?
Any help would be really appreciated!

https://pemersatubangsa.ornop.org · 26/01/2024 at 19:11

My spouse and I stumbled over here coming from a different web page and thought I should check things out.
I like what I see so now i am following you. Look forward to checking out your web
page for a second time.

[https://vinagarut.xyz bokep tante · 26/01/2024 at 19:17

What’s up to every one, because I am in fact eager of reading this website’s post to be updated on a regular basis.

It includes fastidious information.

[https://kimcil.site link bokep · 26/01/2024 at 19:34

Pretty! This has been an extremely wonderful post.
Thanks for providing these details.

Unknown · 26/01/2024 at 19:35

Somebody necessarily help to make significantly articles
I would state. That is the first time I frequented your website page
and to this point? I amazed with the research you
made to make this particular put up incredible.
Excellent task!

https://vinagarut.xyz · 26/01/2024 at 20:20

Asking questions are in fact pleasant thing if you are not understanding something totally, however this piece of writing
presents good understanding even.

forum dewasa di indonesia · 26/01/2024 at 21:09

Just want to say your article is as astounding.
The clarity in your post is simply nice and i could assume you are
an expert on this subject. Well with your permission let me to grab your RSS feed to keep
up to date with forthcoming post. Thanks a million and please continue the enjoyable work.

Averyt · 26/01/2024 at 21:28

SEO Optimizers Team https://zetds.seychellesyoga.com/info

bokep indo · 26/01/2024 at 21:28

Hey I know this is off topic but I was wondering if you knew of any widgets
I could add to my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some
experience with something like this. Please let me know if you run into anything.
I truly enjoy reading your blog and I look forward to your new updates.

situs bokep · 26/01/2024 at 21:40

Thanks very interesting blog!

bokep bocil · 26/01/2024 at 21:50

Hey there! Someone in my Myspace group shared this site with us so I came to look
it over. I’m definitely enjoying the information. I’m bookmarking and
will be tweeting this to my followers! Excellent blog
and fantastic design.

bokep bocil · 26/01/2024 at 22:34

Hey I know this is off topic but I was wondering if you knew of any widgets
I could add to my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have
some experience with something like this. Please
let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

link bokep · 26/01/2024 at 23:28

Sweet blog! I found it while searching on Yahoo News.
Do you have any tips on how to get listed in Yahoo News?
I’ve been trying for a while but I never seem to get
there! Thank you

[https://mimpibasah.site bokep abg · 26/01/2024 at 23:36

Its such as you learn my thoughts! You seem to understand a lot about this, like you
wrote the book in it or something. I believe that you simply can do
with a few percent to power the message house
a little bit, but instead of that, that is magnificent blog.
A great read. I will definitely be back.

forum igo gbar · 26/01/2024 at 23:36

My brother suggested I might like this blog. He was entirely right.
This post truly made my day. You can not imagine just
how much time I had spent for this information! Thanks!

[https://lendir69.ornop.org forum lendir malang · 26/01/2024 at 23:38

My developer is trying to convince me to move to .net from PHP.
I have always disliked the idea because of the expenses.
But he’s tryiong none the less. I’ve been using Movable-type on various websites for about a year and am nervous about switching
to another platform. I have heard excellent things about blogengine.net.
Is there a way I can import all my wordpress content into
it? Any help would be greatly appreciated!

link bokep · 27/01/2024 at 00:13

Hello, I want to subscribe for this webpage to obtain most up-to-date updates,
so where can i do it please help.

video forum lendir · 27/01/2024 at 00:24

I am not sure where you’re getting your info, but good topic.

I needs to spend some time learning much more or understanding more.
Thanks for wonderful information I was looking for this information for
my mission.

alexis jadi 4play · 27/01/2024 at 00:36

Hello! I’ve been following your web site for some time now and finally got the bravery to go ahead and give you a shout out from Houston Texas!
Just wanted to say keep up the excellent
work!

46.116 forum · 27/01/2024 at 00:41

Hi there, I log on to your blogs daily. Your writing style is witty, keep up the good work!

bokep tante · 27/01/2024 at 00:54

Hello superb blog! Does running a blog similar to this require a large amount of work?
I’ve absolutely no knowledge of programming but I had been hoping to start my own blog in the near future.

Anyhow, if you have any recommendations or techniques for new blog owners please
share. I understand this is off subject but I simply wanted
to ask. Many thanks!

bokep indo · 27/01/2024 at 01:07

That is a good tip particularly to those new to the blogosphere.
Short but very precise info… Thank you for sharing this one.
A must read article!

[https://vinagarut.xyz bokep bocil · 27/01/2024 at 01:08

Hi, its pleasant article on the topic of media print, we all be aware
of media is a enormous source of data.

forum dewasa · 27/01/2024 at 01:12

Thanks for sharing your thoughts on forum dewasa surabaya.
Regards

[https://forumigo3.ornop.org forum igo instagram · 27/01/2024 at 02:15

Great site. Plenty of helpful information here. I am sending it to a
few buddies ans also sharing in delicious. And certainly, thank you
in your sweat!

[https://lendir69.ornop.org forum lendir bb17 · 27/01/2024 at 02:16

My family every time say that I am killing my time here at web,
except I know I am getting experience everyday by reading such good content.

gocrot alternatif · 27/01/2024 at 02:49

I am sure this article has touched all the internet users, its really
really good post on building up new webpage.

forumsemprot · 27/01/2024 at 02:56

I do not know if it’s just me or if everyone else experiencing problems with your blog.
It appears like some of the written text on your content are running off the screen. Can somebody else please comment and let me know if this is happening
to them as well? This could be a issue with my internet browser because I’ve had this happen before.
Kudos

bokep indo · 27/01/2024 at 03:23

Hello There. I found your blog the use of msn. That is an extremely neatly written article.
I will be sure to bookmark it and return to read more of your useful info.
Thanks for the post. I’ll certainly return.

Arielt · 27/01/2024 at 03:25

I offer mutually beneficial cooperation https://zetds.seychellesyoga.com/info

bokep indo · 27/01/2024 at 03:26

If you want to improve your familiarity just keep visiting
this website and be updated with the latest news posted here.

[https://forumdewasa.ornop.org forum dewasa sex · 27/01/2024 at 03:28

Hey I know this is off topic but I was wondering if you knew of any widgets I could add to
my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this.
Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.

bokep indo · 27/01/2024 at 03:33

What’s up, its good post regarding media print, we all be aware
of media is a impressive source of facts.

link bokep · 27/01/2024 at 03:45

Thanks for sharing your thoughts about bokep tante.

Regards

bokep tante · 27/01/2024 at 04:39

Great delivery. Outstanding arguments. Keep up the amazing
effort.

[https://forumlendir.ornop.org forum semprot lendir · 27/01/2024 at 04:54

Hi there to all, since I am in fact eager of reading this website’s
post to be updated regularly. It carries nice material.

[https://videomesum.co bokep bocil · 27/01/2024 at 05:19

You should take part in a contest for one of the most useful websites online.
I most certainly will highly recommend this website!

bokep abg · 27/01/2024 at 06:21

Appreciation to my father who shared with me on the topic
of this weblog, this website is really remarkable.

https://lendir69.ornop.org · 27/01/2024 at 06:22

What’s up to every one, for the reason that I am actually eager of reading this website’s post to be
updated on a regular basis. It carries nice stuff.

forum lendir org · 27/01/2024 at 07:30

This is a topic which is close to my heart… Cheers! Where are your contact details though?

bokep indo · 27/01/2024 at 07:36

Wow, this article is pleasant, my sister is analyzing these kinds of things, thus I
am going to convey her.

[https://videomesum.co bokep abg · 27/01/2024 at 07:48

Hey I know this is off topic but I was wondering if you knew of any widgets I could
add to my blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and
was hoping maybe you would have some experience with
something like this. Please let me know if you run into anything.
I truly enjoy reading your blog and I look forward to your new updates.

link bokep · 27/01/2024 at 07:54

Paragraph writing is also a fun, if you know afterward
you can write otherwise it is complicated to write.

forum lendir semarang · 27/01/2024 at 08:04

Howdy! I could have sworn I’ve been to this site before but after browsing through some of the post I realized it’s new to me.

Nonetheless, I’m definitely happy I found it and I’ll be bookmarking and checking back often!

Leave a Reply

Avatar placeholder