PHP + curl - A Simple example of how to use cURL
HTML-код
- Опубликовано: 23 ноя 2024
- #phpCurl #phpTutorial #developmentTutorial
In this video, we take a look at a simple cURL example in php. CURL can be a valuable tool in your developers tool bag!
Company Website: www.ideapro.com
I have been writing software for 30+ years and enjoy working with new clients and teaching others how to develop.
SEND BUSINESS CORRESPONDENCE TO:
Idea Pro LLC or Joshua Herbison
2901 E Greenway Rd. #54171
Phoenix, AZ 85032
In my tutorials, you will see me upload files to the server. To upload, I use Sublime Text 3 with SFTP by WBond. idp.bz/sftp
WordPress Codex: idp.bz/wordpres...
I use cURL a lot in development. Let me know here in the comments if you want me to expand on the example and even possibly build out a full API that can pull data from another site.
Yeah, why not. Go for it.
Cool! Thanks!
What do you need help with? You can email me at josh@ideapro.com
Are you able to show how to use a refresh_token once and main token is expired?
You are the king of PHP . Thanks for tutorials!
Ha! Thanks. Thanks for watching and commenting.
This was EXACTLY what I was looking for. Thanks for putting in json with it as well and keeping it as simple as possible. Now I can do my REST API calls without bothering the external API server the whole time.
Thank you Joshua so much for your explicit [ detailed ] explanation - Love to watch your videos and learn.
Awesome.. Thank you for watching and commenting.
thank you very much sir. I couldn’t grasp the true essence of cURL until I watched your tutorial. Great video!!!😊👏👏👏
Awesome. Thank you.
Thank you for mentioning that there are curl builders out there! Twillio only gives curl examples on their examples and I found a curl to php website that has done all the hard work for me :D
Of course we are waiting for the expand of this topic
Cool. I will work on that video. Thanks for watching and commenting.
I love this so much...... thanks Josh
Thanks for this Joshua. If you ever get a chance I'd like to see a tutorial on the POST method for cURL. Basically filling out a form and then sending that data using cURL and a JSON File.
Ok, I will add that to the list and do that video next.. Possibly today or the next couple of days. Thank you for watching and commenting.
best video regarding curl php
Well explained topic. However, it appears like this is the only topic on cURL. If there are others, please point me to them. Thanks
Great video sir we need more interesting video
Like what? Thanks for watching and commenting.
@@jherbison like how we make a simple preloader plugin CSV maker plugin print functionality and forms etc
Hello Joshua,
You mentioned that you used cURL to track number of sold products from your client's site.
So could you plz briefly mention the main points of the process? I mean, one could also put a plugin that would fire on every successful sale and contact an external API via POST method. But I guess cURL allows intrusion without login or inserting plugin as it can easily be deleted by client.
What makes cURL ideal for this circumstance.
Im still learning backend WP and finding your tutorials very VERY helpful. Dnt stop plz. :)
Although a video on using cURL to track something like purchases on a client site would be great ✌🏼🙂
Sorry for the delay in responding.. I just released a video that addresses your question... Kind of!!!! I will address the Curl on another video this week.
ruclips.net/video/V_My277URS8/видео.html
@@jherbison Thank you soo much mate :D
Thank you this helped in one of my projects
Would love to see a vid on using cURL in wordpress to hide API keys. I'm using leaflet map and need an API key in my markers url and I can't figure out how to hide it.
Not sure I completely understand. Who are you trying to hide the API keys from? If it is PHP with Curl, the only people that could see the API key is anyone that has access to the code. PHP code isn't viewing to the public.
@@jherbison Sorry for the vague comment. I have a real estate website that is pulling listings from a json url and displaying those listings on a map. This is done via javascript so all the code is visible in the source and that includes the url to the json file which contains an API key.
I was told I needed to use cURL to hide the key and then call to it via a variable in my javascript code. I'm a bit of a novice so I'm pretty lost.
Oh ok, can you email me more details at josh@ideapro.com?
@@jherbison Sending you an email now!
I replied to your email. Did you get it?
sorry sir, I get this error when trying to access external API: OpenSSL SSL_connect: Connection reset by peer in connection to blablabla, how do i fix it?
Sir now a days I am working on WordPress back up site plugin. Can you please make a video on back up plugin that how we easy create backup site plugin.
So you want me to make the plugin for you? ;-). What do you want to do different than the other plug-ins out there don’t do?
@@jherbison Yes sir there is multiple plugins are available for backup a wordpress site but I have to learn plugin developement so my task to create a backup plugin for WordPress
I have confuse how to do this
I have multiple options
Like if a use only databases file then the images and assets folder will not Work how I download both things
Database and wordpress file like All in one migration plugin.
Can you please tell some major function or topic related to this
That is a big plugin to learn on!
@@jherbison yes sir I know but I have to done this
Cool. Good luck.
I want to use post curl api which has been given by vendor, how can I call that in my code?
My curl_exec is returning false . Can you tell me how to get my desired json file
Thank you for watching and commenting.. Send me an email with your code to josh@ideapro.com you may just need to add a couple of lines in the curl to turn off verify host.
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
Sir how we make Medicine bill price calculator in WordPress with code
Please explain more of what you are looking for.
@@jherbison sir recently I have done project hospital managnment system on WordPress but my client ask me please Make a form which do calacultion of purchase medicine
Example
If a user buy one tablet form pharmacy so the system calculate the Medicane price calculation with discount and give total amount with print slip functionality one user done they get slip of her purchase record
And print slip record have name of hospital and address phone and note form hospital which is permant and default print on every slip
Спасибо за видео
Пожалуйста. Спасибо за просмотр и комментарий.
How to fetch api data every second without setInterval as setinterval is just single threaded and not proper solution for this