All,
I have a PHP CURL request to an HTTPS site which takes a JSON and request and returns a JSON response. Usually it should not take more than 1 second. But, I have seen that the CURL response time is variable. Sometimes, it takes 4 seconds to respond and sometimes 1.2 seconds. Why is this so and How can I make it faster and process t...
Im working with the apple push notification service, and i notice that some php apns code i found is using stream_socket_client. My host doesnt support this, but it does support curl. Ive read that curl can do SSL connections like the code uses, but im wondering if [a] anyone has experience in doing specifically this, and [b] the intersw...
Hi
I have have problem while using the cURL in my php script.
Wheni used it its given me below error.
Fatal error: Call to undefined function curl_init()
This problem is for both local and live url .
But when i move my code to live its working fine.
I have contact n/w admin but its say that there is no such restriction in firewall...
Hi,
I'm looking to achieve the effect facebook has when you put a link into a message - they scrape the title and some images from it.
I noticed they also do it extremely quickly. (they must cache some of the re-sent items?)
Does anyone have any ideas on how to approach this with PHP?
Can I somehow quickly grab the <title> block of the...
Hello,
I want to ask this question because the php documentation doesn't mention it
How would one put xml data and binary data together?
$imagecontent = @file_get_contents($imagelocation);
$xmldata ="<xml></xml>";
$headers = array("MIME-version: 1.0");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "PUT");
curl_setopt($ch, CURLOPT_HTTPHEADER,...
I have built a php script which receives values in $_POST and $_FILES
I'm catching those values, and then trying to use CURL to make posts to FogBugz.
I can get text fields to work, but not files.
$request_url = "http://fogbugz.icarusstudios.com/fogbugz/api.php";
$newTicket = array();
$newTicket['cmd'] = '...
Really confused - Guess it has to do with a single character placement at the end, or possible padding done with basic digest that I'm not aware of..?
So, if I execute this, you can see the product of the base64 encode:
echo '[email protected]:password' | openssl enc -base64
aG9zdEBtYWlsLmNvbTpwYXNzd29yZAo=
Now, if I make a curl request:...
hi,
i am using curl to get some info from a website, however it uses the server ip address but i want it to use the client ip address, so each user send request with their own ip not the servers, how is that possible?
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "URL");
curl_setopt($ch, CURLOPT_FAILONERROR, 1);
curl_setopt($ch, CURL...
This url
'http://profile.myspace.com/index.cfm?fuseaction=user.viewProfile&friendID=39726387'
works perfectly well in a browser but cURL return's error 3 (malformed url).
Any ideas on a work around?
EDIT:
cURL code:
function get_web_page( $url )
{
$options = array(
CURLOPT_RETURNTRANSFER => true, // return web p...
I'm using PHP to send videos via Direct Upload to Youtube. It works fine for smaller sized videos but when trying to send a 390 MB video, I get the following error:
PHP Fatal error: Out of memory
(allocated 3932160) (tried to allocate
390201902 bytes)
I've tried increasing memory_limit but that does not help.
if ($isFile)...
Scenario
I have a old blog on blogger that contains thousands of images and posts, i have already imported the posts from blogger to wordpress using their import service (which does not import images) now i want to write a php cURL script that will download all the images off my old blogger blog to wordpress.
Problem
I have already w...
hi,
i need to send a request to a website when a user submits their url, i tried using curl but it uses server ip which i dont want i have seen a website that is doing a similar job by using applet, users need to open a popup which contains the applet after they leave it open allow it to run it uses a port and then uses the localhost ip ...
Hi, thanks for reading this.
I was wondering if I have some simple authentication system in place, like authlogic, how does one use curl to post and put data and, even before talking about posting and putting data, how does one "login" with curl and have the server remember or have curl remember that it is logged in?
if you were to ch...
Can anyone teach me, preferable show some sample how to do a php + curl HTTP POST?
I want to send data like, username=user1, password=passuser1, gender=1 etc to www.domain.com
And I am expecting a response, e.g "result=OK".
Thanks
...
I'm building a REST web service client in PHP and at the moment I'm using curl to make requests to the service.
How do I use curl to make authenticated (http basic) requests? Do I have to add the headers myself?
If so I've got some other questions -
Is there a REST library for php?
or is there a wrapper for curl that
makes it a bit ...
The title says it all, even if it is a mouthful!
I need to download a file on a corporate Sharepoint site using CPython. Existing codebase prevents me from using Ironpython without porting the code, so .NET's WebClient library is out. I also want to download the file without prompting the user to save and without prompting the user for ...
Hi,
I'm having a problem with cURL. I am downloading images and saving them to a folder. The file that cURL creates has the right filesize, which makes me think that the headers are being read properly. But, when I open the file up in my browser or in any picture-viewing application, only a tiny bit at the top appears to actually hav...
Hi, I'm looking to update twitter using cURL. I've written a bash fuction, but I'm not sure how to get it to accept a line as an argument to use as status text. The current function just accepts the first word as an argument. Also, can I prevent it from returning the XML file or suppress it from going to stdout?
Thanks
#!/bin/bash
f...
I think I have this narrowed down to something debuggable
This will not work, where I am just sending in 'paste[body]=<'
curl http://pastie.caboo.se/pastes/create -H 'Expect:' -F 'paste[parser]=plaintext' -F 'paste[body]=<' -F 'paste[authorization]=burger' -s -L -o /dev/null -w '%{url_effective}'
This will work, where I send in 'past...
Hi there,
I'm working on a site in Drupal which will reside at http://sub.clientdomain.com, pulling in an static html fragment from a server on at http://clientdomain.com/path/to/fragment.html, which I need to display in a page, to give a parent menu for a site.
I'm working on a VPS, so I have access to curl, wget and pretty much anyth...