[Solved] Getting blank array from web service

Use urlencode() This is working now : <?php $post_name=”BSN Syntha-6 Isolate”; $base = “http://52.53.227.143/API_test.php?post_name=” . urlencode($post_name); $str = file_get_contents($base); echo ‘<pre>’; print_r(json_decode($str)); ?> 2 solved Getting blank array from web service

[Solved] How to do a PHP curl post [closed]

// init curl $handle = curl_init(); // set options/parameters curl_setopt( $handle, CURLOPT_URL, ‘https://developer.lametric.c…’); curl_setopt( $handle, CURLOPT_CUSTOMREQUEST, “POST”); curl_setopt( $handle, CURLOPT_POSTFIELDS, ‘the-json-encoded-data-here’ ); curl_setopt( $handle, CURLOPT_RETURNTRANSFER, true ); // you want to get the response // set headers curl_setopt( $handle, CURLOPT_HTTPHEADER, array( ‘Accept: application/json’, ‘….’ ) ); // execute the request and get the response $response … Read more

[Solved] Downloading files with curl in PHP [closed]

Im not sure what is your problem. If you just don’t know how to use CURL – here you have example: $oCurl = curl_init(); // initialize curl object $url=”http://domain.com/page”; curl_setopt($oCurl, CURLOPT_URL, $url); // set URL $siteContent = curl_exec($oCurl); // you will get HTML or other file contents here 0 solved Downloading files with curl in … Read more

[Solved] How to achieve curl in java? [closed]

In curl -F means post the form data, usually the content type is multipart/form-data. You can use the Apache HttpClient library for this purpose in Java. Here is an example of posting form using MultipartRequestEntity. Before looking into this example, I’ll suggest you to try this example to be habituated with normal http POST. 1 … Read more

[Solved] I need help solving a simple exercise (I’m new, so it’s all like heiroglyphics to me)

Open Slashdot.org Right-click on headline and select “Inspect element” (Chrome) Do this again with another headline Check for similarities in html-code (like classes) Loop through all elements with same class and write them to an array Write a function that loops through that array and returns each element of the array 5 solved I need … Read more

[Solved] We need a script to create a backup of all the files, database and email using third party Cpanel details in PHP

include “xmlapi.php”; $source_server_ip = “”; $cpanel_account = “”; // cPanel username $cpanel_password = ”; // cPanel password //Credentials for FTP remote site $ftphost = “”; // FTP host IP or domain name $ftpacct = “”; // FTP account $ftppass = “”; // FTP password $email_notify = ”; // Email address for backup notification $xmlapi = … Read more

[Solved] Converting php to c#, curl to .net [closed]

You do not specify anything, not even if it is a GET or POST, but this is an example from Postman using restsharp var client = new RestClient(“https://google.com”); var request = new RestRequest(Method.GET); request.AddHeader(“postman-token”, “49bab31b-6be2-5862-e3ca-351cb8b35d86”); request.AddHeader(“cache-control”, “no-cache”); IRestResponse response = client.Execute(request); solved Converting php to c#, curl to .net [closed]

[Solved] How to execute POST using CURL

from a basic search i found how to do this: $curl –data “responseCode=jorgesys&publication_id=magaz234rewK&version=1.0″ http://mywebsite.com/appiphone/android/newsstand/psv/curl/posted.asp then i have as a result: { “responseCode”: jorgesys, “publication_id”: magaz234rewK, “version”: 1.0 } solved How to execute POST using CURL

[Solved] How to make this HTTP Post request using alamofire? [closed]

let url = “192.168.1.1/api/project” var header = [String:String]() header[“accept”] = “aplication/json” header[“key”] = “David” let reqParam = [“project”:[“title”:”Test Title”,”description”:”Test description for new project”,”priority”:false,”category_id”:1,”location_id”:1]] Alamofire.upload(multipartFormData: { multipartFormData in for (key, value) in reqParam{ do{ let data = try JSONSerialization.data(withJSONObject: value, options: .prettyPrinted) multipartFormData.append(data, withName: key) }catch(let err){ print(err.localizedDescription) } } },usingThreshold:UInt64.init(), to: url, method: .post, headers: … Read more