FAQ Database Discussion Community


push url to other local page

jquery,json,post,get
So im making an webos app for my self. I need to push a url/name to another page, then redirect and view the pushed url. I need this to be done with JQuery. This is what i've got. <div class="twitch-widget-gamelist" id="twitch-widget-gamelist"> // IN HERE IS A LOST OF GAMES </div>...

Reveal info by clicking on link

arrays,post,hyperlink,get
I have 4 links: <a href=""><img src="img/photo1.jpg" /></a> <a href=""><img src="img/photo2.jpg" /></a> <a href=""><img src="img/photo3.jpg" /></a> <a href=""><img src="img/photo4.jpg" /></a> I also have md array: $users = [ "id_1" => [ "personal_id" => "111111", "name" => "Arthur Novickov", "location" => "Moskow", "age" => "22", "status" => "online" ], "id_2" =>...

My get request for http is very slow [closed]

sockets,http,get
I need to make a request through a socket and catch the response but in while block goes slow. I think i have written enough information, but if someone can help me and need additional information i will answer him/her. Thank you. import java.io.InputStream; import java.io.PrintWriter; import java.net.InetAddress; import java.net.Socket;...

When trying to call an object with get() within group_by and mutate, it brings up the entire object and not the grouped object. How do I fix this?

r,get,group-by,dplyr,mutated
Here is my code: data(iris) spec<-names(iris[1:4]) iris$Size<-factor(ifelse(iris$Sepal.Length>5,"A","B")) for(i in spec){ attach(iris) output<-iris %>% group_by(Size)%>% mutate( out=mean(get(i))) detach(iris) } The for loop is written around some graphing and report writing that uses object 'i' in various parts. I am using dplyr and plyr. Sepal.Length Sepal.Width Petal.Length Petal.Width Species Size out 1...

NodeJS http.get quit my app

node.js,http,get
I have a werd problem. When i am running this code to get a image, but some images make this line quit my program. I dont get any error and i dont know how to debug the problem. http.get(obj.image.url.split("?")[0], function (getResponse){ var chunks = []; getResponse.on('data', function (chunk){ chunks.push(chunk); }).on('end',...

AppleSctipt Finding File with partial filename

get,applescript,filenames
I am an applescript noob and i need help getting a certain log file that has a long string of numbers in its title. The number changes and the filename before the number string is unique to the folder it is in. Is there some way i can use the...

How to get the index of a specific item in an ArrayList?

java,object,arraylist,get,indexof
I fill up an Array List with some numbers and want to find a specific number that is in the Array List and get its position (the index) in my Array List. Any example would be great! for example ProClon.indexOf(spro.getId(id)); ...

JSP form sending data including files in servlet

java,jsp,servlets,post,get
I am tryig to send some data from jsp form to a servlet. All my data are type="text" except from one that is type="file". I know that if i want to send the data to my servlet, i have to use request.getParameter(...). (My data) In order not to be null...

special characters send with url

php,html,forms,get
How do i get the special characters from a form submit. For example: a form got a name="customer[firstname]". The url will be customer%5Bfirstname%5D=Test. i've tried: $firstName = $_GET['customer[firstname]']; also the same with urldecode, rawurldecode....

Is it bad practice to dynamically create a variable from array to read a $_GET method in php

php,arrays,get,dynamic-variables
Going through a php class file at work I found an interesting snippet. The script is dynamically creating a variable, dynamically checking if there is an active $_GET[''] for the variable it's creating and if there is it's loading the $_GET data and if it's not it's writing N/A to...

How can I send GET request with sockets?

c#,sockets,get,request,send
I want to send GET/POST request with sockets, and I have this code: Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp); socket.Connect(Url, 80); byte[] contentLenght = Encoding.ASCII.GetBytes(Data); string[] masRequestString ={ "GET /"+Data+" HTTP/1.1\r\n" , "Host: "+Url+"\r\n", "User-Agent: "+textBox1.Text+"\r\n", "Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8\r\n", "Content-Type: application/x-www-form-urlencoded; charset=UTF-8\r\n", "Referer: "+textBox2.Text+"\r\n"};...

How to get my GET value?

javascript,get
When I go to this link : http://main.php?valretour=OK, how can I get the value of valretour? Main.php I tried this directly in my PHP page...: <script> alert($_GET['valretour']); if($_GET['valretour'] == "OK"){ $.toaster({ priority : 'success', title : 'Success', message : 'OK' }); } else { $.toaster({ priority : 'warning', title :...

Angular Directive and $http get

angularjs,http,angularjs-directive,get
I'm struggling with my getting my directive to populate with data from an api. If I feed it with regular json it works just fine, but if I use http get I get blanks (the response is fine in the console). What's best practice in this scenario. I found something...

Parsing HTTP GET - C

c,http,get
I'm trying to parse an HTTP GET request, and have been doing so using strtok(), however I am running into problems when trying to use strcpy(). I can parse the file path and file name fine, but can't seem to parse the remote host DNS name. Below is code that...

$http.get giving the html of my index.html in Angular

angularjs,http,get
This is an odd problem- Sorry in advance for all of the code but I think it will help you understand what I'm attempting. I have the following in my index.html <!DOCTYPE html> <html ng-app="mainApp"><!--Bootstrap the angular application --> <head> <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.14/angular.min.js"> </script><!-- Angular js CDN --> <script src="https://cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.15/angular- route.min.js"></script><!--...

How get images in Parse, Cell name works but images don't load

image,swift,parsing,get,tableview
I can load images from parse, but they have a code name, I want to show the images at the cell, don't load the images! // import UIKit import Parse import Bolts class LojasViewController: UIViewController, UITableViewDelegate { var ParseData = [PFObject]() var ParseImages = [PFFile]() @IBOutlet weak var saloesTableView: UITableView!...

How to debug a get request in php using curl

php,rest,debugging,curl,get
I'm trying to make a get request in php using curl. This is what I'm doing: $curl = curl_init(); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_BASIC); curl_setopt($curl, CURLOPT_USERPWD, "username:password"); curl_setopt($curl, CURLOPT_URL, $url); curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec($curl); curl_close($curl); printf($result); But $result doesn't print out anything, no success or failure message. I've successfully reached...

Passing GET variables to shell_exec in PHP

php,shell,get,mamp
I'm trying to run a shell script in PHP on my server that use youtube-dl to download a video. My code look like this: <form action="download.php" method="get"> <input type="text" name="link"><br> <input type="submit"> </form> and my download.php look like this: <?php $link = escapeshellarg($GET["link"]); $output = shell_exec('/Applications/MAMP/cgi-bin/youtube-dl ' .$link. ' 2>&1');...

cakePHP returning empty parameters on the GET request

cakephp,get,cakephp-3.0,hiawatha
I'm having problem to read parameters on the GET request: www.example.com/users/checkusername?username=e I'm using cakePHP 3, on cakePHP 2.6.4 is working without problem. By these way I have an empty result: $this->log($this->request->query['username']); $this->log( $this->params['url']); Result: 2015-04-28 17:28:22 Error: 2015-04-28 17:28:22 Error: However, checking the whole request it's possible to verify that...

Moodle php get current user country

php,get,user,profile,moodle
How can I get current logged in users country from profile information? I have searched many sites, have found some answers, but I haven't got them working. I currently have this code, that doesn't do the work: global $user; if ($user->country == 'Estonia') { redirect($CFG->wwwroot .'/course/view.php?id=15'); } else { redirect($CFG->wwwroot...

PHP append content to a file (reading/writing of a file)

php,get
I'm still rather new to PHP and I'm working on a trying to do something kinda like this; down.php?days=numberHere take that number and write it to a file and then display the file in a spot, I know how to display the file but I'm not really sure how to...

Open a PDF in a new window of the browser with angularjs

angularjs,http,pdf,browser,get
I'm new to angular js and I wish to open a PDF document in a new window of the browser after pressing a button. I make a GET request with $http.get() at front end, at backend there is a Java rest service that respond to the GET and generates a...

Passing “get” parameters doesn't work, parameter not visible in the link

jsf,get
Good evening Everyone, I'm a beginner to JSF and I want to code a little searchbar on my future website. I made two pages : index.xhtml and search.xhtml, and I try to pass get parameters from index.xhtml to search.xhtml, so I made this little formular : <!-- index.xhtml --> <h:form...

Save data from api request to db (JSON)

ruby-on-rails,json,api,ruby-on-rails-4,get
I sending messages from my rail app through third party and track the deliver details and store it in my database table.After sending messages third party post deliver details to my given URL,I got response to my URL like. http://yourdomain.com/dlr/pushUrl.php?data=%7B%22requestId%22%3A%22546b384ce51f469a2e8b4567%22%2C%22numbers%22%3A%7B%22911234567890%22%3A%7B%22date%22%3A%222014-11-18+17%3A45%3A59%22%2C%22status%22%3A1%2C%22desc%22%3A%22DELIVERED%22%7D%7D%7D Like following format, data={ "requestId":"546b384ce51f469a2e8b4567",...

.getTextContent returns text from child elements too

java,xml,string,get,element
I'm trying to get XML parsing down (and yes I know there's easier ways to parse/validate like xstream) but I can't seem to get text content of just a single element. For example: <container> <element0>textThatIWant</element0> //only returned by .getTextContent <element1> <subelement0>textThatIDontWant</subelement0> //but also returned by <subelement1>textThatIDontWant</subelement1> //.getTextContent </element1> <container> I'm...

Android fails when trying to GET http request

java,android,json,get,httprequest
I'm trying to get information from a http request but it shows the following error: > 06-17 18:06:05.931 10913-10913/com.example.user.project > E/RecyclerView﹕ No adapter attached; skipping layout 06-17 > 18:06:05.947 10913-10913/com.example.user.project E/AndroidRuntime﹕ > FATAL EXCEPTION: main > Process: com.example.user.project, PID: 10913 > android.os.NetworkOnMainThreadException > at android.os.StrictMode$AndroidBlockGuardPolicy.onNetwork(StrictMode.java:1147) > at...

Java Junit Failure For an Attribute Class

java,junit,enums,get
I have the class Mappa that has mappaName as an attribute (to choose from the enum Name) and a method getMappaName that returns it, when i run a test to compare one of the mappaName chosen from Name i get expected FERMI but was:null public class Mappa { private Name...

how to use GET to obtain info from a URL

php,api,get
I'm a php programmer but I'm new to APIs. I would like to run a mysql query to get info from an XML document from madmimi.com. documentation from madmimi.com says GET http://madmimi.com/audience_lists/lists.xml will return the data I need. I've created a php file and connected to their API using require(dirname(FILE)...

Why is filter_input returning NULL when the variables exist?

php,get,filter-input
I'm trying to retrieve some GET data and filter it to make sure it contains an integer. The url string is events.php?id=22&month=2, but when I try to get either variable filter_input returns NULL for some reason, I can't figure out why. This is my code: if(!isset($pageId)) { $pageId = filter_input(INPUT_GET,...

Get & Set MySQL Select

c#,mysql,get,set
What am i missing here, it seems the main form is not calling the method from tsDBCon class and not connecting to the database, i need help, i'm new to get:set properties, am i doing it wrong or what? thanks. public class tsDBCon { private string _user; private string _pass;...

how can i get the angular Velocity of an object? corona, lua

lua,get,corona
I have a slowmotion mode and I need to get the angular Velocity of an object so I can make it slower. I am using corona, lua.

Getting large photo with additional fields - Facebook

facebook,facebook-graph-api,get
So this is how I'm retrieving Facebook friends and profile picture right now: https://graph.facebook.com/{{user_id}}/?fields=picture,friends&access_token={{app_id}}|{{app_secret}} However, the photo I get with it is small and the only way to get a large photo is: https://graph.facebook.com/{{user_id}}/picture?type=large&access_token={{app_id}}|{{app_secret}} So now I have to make two get requests; one for a large photo, and one...

Pass string variable to db helper and use in query

android,arrays,android-intent,get
I have created two string variables, 'questionString' and 'answerSetId' - the first of which I have assigned to a textview - the second of which I would like to pass to my db helper class: public void showNextRandomQuestion3() { SQLDatabaseHelper db = new SQLDatabaseHelper(this); //get the data from the database...

Web api Post from other domain and computers

javascript,.net,post,web,get
good morning, So, i have created a new Web-API based asp.net. If i understood right, you cant POST/GET from other domains. I need to give this web api to my freinds, which use php/javascript/andriod/iphone and be able to allow them to POST/GET to my web api. So my question is,...

Get the article to extract title, alias, content, etc. Joomla 3.X [PHP]

php,joomla,get,extract,article
I'm new on this community, and I'll be very grateful if someone can help me with this. Well, I'm trying to get the information from any article, by ID or by [object]. The idea is, "do some actions" for all of these data, extracting the "title", "content", etc. then manipulate...

Retroft GET Request Call

android,get,retrofit
There are a lot of examples but I didn't find what I really wanted (didn't get it) so if anyone would like to help it would be appreciated. using post I know we do the following: @POST("/SearchFor") @FormUrlEncoded void SearchFor(@Field("QueryID")String QueryID,@Field("ElementID")String ElementID,@Field("Language")String Language, Callback<Response> cb); Then implement on success and...

How can I change $_GET['phone']; on $_GET['url'];? [closed]

php,get
How can I change $_GET['phone']; on $_GET['url']; ? I can not change help me please! At me now this kind of site.com/profile.php?phone=$1 I need this kind of site.com/profile.php?url=$1 <?php if (isset($_GET['phone']) === true && empty($_GET['phone']) === false) { $phone = $_GET['phone']; if (user_exists($phone) === true) { $id = id_from_phone($phone); $profile_data...

How to get $_GET variables from referrer url in Yii?

ajax,url,yii,upload,get
I trying upload images on server by Ajax, when server catching files the files are writing to database. But here now I need to parse referrer url to get Id. For now I have only this solution: public function actionAjaxTest() { if(Yii::app()->request->isAjaxRequest) { echo json_encode(parse_url(Yii::app()->getRequest()->getUrlReferrer())); } Yii::app()->end(); } Is Yii...

Model.objects.get returns nothing

python,django,object,get,models
I'm having this weird problem when using Model.objects.get(op1=1,op2=2) it raises the does not exist error although it exists. Did that ever happen with anyone? I even checked in my logs to make sure that the log happened when the id already existed in the database. [2015-04-24 20:18:21,106] ERROR: Couldn't find...

Why does the “request module” in Node.js accept only the URLs written with protocol?

node.js,http,get,protocols,node-modules
I want to send a GET request using request module. Here's the code: var requestModule = require('request'); var url = require('url'); var myUrl = 'www.google.com'; var myUrlObj = url.parse(myUrl); requestModule(myUrl, myUrlObj , callback); but it doesn't work because myUrlObj has a null value for its "protocol" attribute. The same code...

PHP !_GET displays blank page

php,html,get
So this is my URL: http://myawesomesite.com/base.php?file=myawesomefile and this is my base.php file: <?php if (is_file("$_GET["file"].inc.php")) include ("$_GET["file"].inc.php"); else include("homepage.inc.php"); ?> This results in a blank page. What am I doing wrong? Thanks in advance. Cheers!...

PHP - Retrieve via $_POST the hidden input's value between several others

php,html,get,submit
I have a table that is in a foreach loop, and every iteration the hidden input receives the ID from the database. My table has in each column an input field because I'd like to edit the data from the database right in the table, and to make it happen...

Jquery .ajax get request for a json response

javascript,jquery,ajax,json,get
<!DOCTYPE html> <html> <head> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script> <script> $(document).ready(function(){ $("button").click(function(){ $.ajax({ type: 'GET', url:"http://bustime.mta.info/api/siri/vehicle-monitoring.json", data: {key: '', OperatorRef:'MTA%20NYCT', LineRef:'B54', VehicleRef:'9531' }, dataType: 'json', async: false, success: function(result){ $("#div1").html(result); }}); }); }); </script> </head> <body>...

htaccess with different parameters

.htaccess,url,mod-rewrite,get
I'm trying to add a parameter in my url through the .htaccess file. I have 5 parameters,3 int,1 float (for example 3.5) and a string. With 4 parameters, without the string, it works well; but if I try to add the fifth parameter, the get variable of this takes the...

Getting relevant information from a GET response using JQuery

javascript,jquery,html,get
I'm trying to get only the necessary information from a GET request. Here's the function I'm using: this.updateTargetList = function(content) { $.get("index.php?AJAXmd=1", function (data) { var selector = "div.list"; $(selector).html(data); }); } The GET returns a whole bunch of html, more than I need, so it's loading that into the...

How to send mix of GET and POST in python

python,post,get,request,python-requests
I'm trying to send a mix of GET and POST to a URL using requests module. Is there a way to do this? What I 've tried is the following: import requests payload = {'test': 'test'} r = requests.post("http://httpbin.org/post?key1=val1&key2=val2",params=payload) print r.text but when I see what is actually being sent...

GET request inside of a loop in JavaScript

javascript,jquery,for-loop,get
So, my code looks something like for(int n = 0; n < object.length; n++){ /*Other code */ $.get(...,function(data){ //do stuff });} Now, the other code executes multiple times like it should. However, when the get command is ran, it is only ran once and that is when n reaches the...

ElasticSearch asynchronous post

database,post,asynchronous,elasticsearch,get
I'm posting data on my ElasticSearch database. I've noticed that data is not immediately available, it requires some milliseconds to show up in a GET request. I can live with that (after all, the calls are asynchronous so this behavior is expected) but in my test code I need to...

Getting a variable from a link PHP

php,variables,hyperlink,get,header
I have two files, one called test3.php, and another called test4.php. I'm trying to echo the variable in the link of the file test4.php, but it's echoing unexpected results. Please take a look. In the file called test3.php: <?php $text = "Good morning."; header('Location:test4.php?text=$text'); ?> In the file called test4.php:...

Servlet reply to getHttpConnection

java,android,http,servlets,get
I have some images in my Servlet that I want to download into my Android app. I am performing a GET request to this URL: public static final String URL ="http://myIpAddress:8080/imgs"; And this class doing the job: private class GetXMLTask extends AsyncTask<String, Void, Bitmap> { StaggeredPrenotaTour staggeredPrenotaView; public GetXMLTask(StaggeredPrenotaTour listView){...

Golang: Passing a URL as a GET parameter

url,go,get,parameter-passing,url-parameters
I want to get an URL as a get aparameter ex: example.com?domain=site.come?a=val&b=val the problem when i use query := r.URL.Query() domain := query.Get("domain") to get the domain name it give just domain=site.come?a=val I think because when the r.URL.Query() meet & it consider it as a new parameter does anyone know...

php form get parameters from url and store it until the final page

php,mysql,forms,get
I wrote a simple PHP survey application about movies and I am using one of the crowdsourcing services to collect data. In order to verify and rate workers, I have to generate VCODE (https://microworkers.com/vcode.php) in the final page and so workers can submit it as their proof of finishing my...

Javascript: pushing certain info to Array and getting info out of array

javascript,arrays,if-statement,get,set
I have a question about the following problem: I made a board for a game made out of pieces. Each piece has its own x and y coordinates, but also a boolean wether it's a road or not and wether it has a turret on or not. So this is...

How to load a page content in variable with jQuery

javascript,jquery,html,ajax,get
A little problem here. I'm trying for 2 hours to load/get/steal my own content page in jQuery/JS variable (I'm trying to understand the logic behind the beast). Now we are, my problem: $(document).ready(function(){ var string = $.get( "/main.html", function( data ){ return $(data).html(); }, "html"); alert($(string).html()); document.title = 'Test ~...

Node.js send Get-Request with Json-Body

json,node.js,get
I'm using Node.js and need to send a get-request with a Json-Message in the body. request = require('request-json'); var client = request.createClient('http://ip'); client.get('/url', jsondata, function(err, res, body) {... does not seem to send any Body-Data. Any ideas how to manage?...

PHP: Instantiate Class using variable - $new = new $_GET['class_name'];

php,get,laravel-5
I need to instantiate a class in PHP. I don't know what that class should be until I grab a $_GET['class_name']. I want to do this: $new_id = \App\Identification\ . $_GET['class_name']::find(1); Instead I have to do: if($_GET['class_name'] == 'Student'){ $new_id = \App\Identification\Student::find(1); } I would really love any help!...

Can't load json from url with Casper Js -> “Loading resource failed with status=fail”

javascript,json,get,phantomjs,casperjs
I am new to casper js and I would like to retrieve a json object from a get request. The message I get is the following : Loading resource failed with status=fail: https://api.twitter.com/1.1/search/tweets.json?q=casperjs Here is my code : var casper = require('casper').create({ verbose: true, logLevel: 'debug', pageSettings: { loadImages: false,...

JAVA RMI get pass ArrayList element

java,arraylist,get,element,rmi
I have a server that contains an ArrayList in " ServerInfo " and when I try to take from ClientRMI an element of the ArrayList(in ServerInfo) for example adf.getSGM ( 0 ).incrementCount( ) ; "count" does not increase it's as if every time I call it instantiates a new class...

youtube api in c# code

c#,api,get,youtube-api
using (var client = new HttpClient()) { client.BaseAddress = new Uri("https://www.googleapis.com/youtube/v3/"); client.DefaultRequestHeaders.Accept.Clear(); client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json")); HttpResponseMessage response = client.GetAsync("search?q=manam&type=video&order=relevance&part=snippet&maxResults=50&key=AIzaSyA4GZFAgfvsAItwFRmnAZvbTHoDeyunf2k").Result; if (response.IsSuccessStatusCode) { dynamic lists = await...

Passing variable from one php file to another

php,html,get
So after my php script is done I have this line: $success = TRUE; header('Location: ../admin.php'); //the main file In the admin.php file I have this line: <?php if ($_GET["success"] == TRUE) { echo "<b>Your file has been imported.</b><br><br>"; } Any idea why this boolean isn't being passed through and...

PHP's preg_replace returns null when replacing underscores with white spaces

php,html,http,get,preg-replace
I have a webpage which includes a hyperlink as follows: $name = "Hello World"; echo "<a href='page.php?name='". preg_replace(" ", "_", $name) "'> bla bla </a>" This generates the following link successfully: ...page.php?name=Hello_World in my page.php I try to reverse the operation: if($_SERVER[REQUEST_METHOD] == "GET"){ $name = $_GET['name']; //testing if the...

How to GET multiple values in php?

php,get
I have a url like this http://example.com/index.php?&item_name_1=productnamex&quantity_1=1&amount_1=0&item_number_1=2&on0_2=thumb&option_index_2=1&item_name_2=productnamex&quantity_2=1&amount_2=0&item_number_2=2&on0_2=thumb&option_index_2=1&item_name_3=productnamexx&quantity_3=1&amount_3=0&item_number_3=3&on0_3=thumb&option_index_3=1..... that sends to a page the values of a shopping card. I want to GET the values item_name_x, quantity_x, amount_x...

How to turn jQuery $.get into Bluebird thenable?

jquery,ajax,get,promise,bluebird
I want to GET with jQuery and thenable it's result but then is never happening; why? Of course I get my JSON response back. Below is full code: var Promise = require('bluebird'); new Promise(function (resolve, reject) { return $.get(url.address, url.options, 'json'); }).then(function (result) { console.log(result); }); ...

Secure ajax GET/POST request for server

javascript,php,jquery,ajax,get
suppose I work with some kind of API and my file server.php handles the connection to the API service. on my client side I use AJAX call like this: $http({ url : 'server/server.php', method : 'GET', data : { getContent : true } }); in my server.php I handle it...

What is the difference of the List declaration?

java,list,arraylist,get
This line reports the methods of Load like Load.getId(): List<Load> dbRecs = dbList.getAllLoads(); Whereas this line reports a incremental hex address List dbRecs = dbList.getAllLoads(); log.d("Load", dbRecs); Now the project can move along. Is the first line posting correct because I supplied a correct structure for the List declaration of...

Why not successful “ HTTP GET request with socket ”?

java,android,sockets,http,get
I want to send GET message at my Android application. After I want to receive GET response as 200 OK. But I didn't accomplish. I received 408 Request Time-outDate or nothing. Can you help me? String requestmsg = "GET / HTTP/1.1\r\n"; requestmsg += "Host: www.ktu.edu.tr\r\n"; requestmsg += "Connection: keep-alive\r\n"; requestmsg...

HTML get request with a get in action URL

php,html,get
So basically my router looks like: /index.php?page=/my/page.php I CAN'T change that at all. I have a form that must be a get request... Is there an easy way to do something like: <form id="frmTaxTypeReport" method="get" action="/index.php?page=/my/page.php"> Everytime I try, I lose the page=/my/page.php If I use hidden, I get: page=%2Findex.php%3Fmm%3D0%26page%3D%2Freports%2FtaxReport.php...

What's the correct way to use https://doesthisgifcontainananimation.com with http://i.imgur.com/tYqyhJT.gif for example? [closed]

html,json,get,request,animated-gif
Or someone else can confirm that this is an incomplete work because I'm getting every response except the ones listed. I plan to use this along with yahoo pipes....

Access JSON Object Prop - Angular JS

json,angularjs,http,get
First time using Angular JS, I'm using $http.get to return a Json object. When I output the response data, I can see entire JSON object in the console, but I can't access the object or properties. What am I missing here? $scope.init = function (value) { $scope.productEditorModel.productId = value; $scope.loadData($scope.productEditorModel.productId);...

CakePHP 1.3 - Extract URL GET parameters

php,url,cakephp,get,cakephp-1.3
I have CakePHP 1.3.2 application working with similar URLs: /controller/action/name1:value1/name2:value2.html I'm trying to extract the values after the : sign specified by the names before that. I can see the whole URL with no problem using $this->params['url'], however, I can't get the value itself using neither $this->params['name1'], nor $this->params['url']['name1']. Any...

Getting numbers from form via POST, not working, PHP

php,forms,post,get
I have 2 files. I'm trying to get the POST from one file to another, yet it's showing up as null for some reason. Please take a look: testx1.php <?php echo "<form method = 'post' action = 'testx2.php'>"; echo "<input type = 'number' name = 'number'>"; echo "<input type =...

Doing a GET passing a complex object with angular

angularjs,get,angular-resource,complextype
I am using AngularJs and Resources module. I want to do a GET to obtain an object.. to do this GET I do not have to pass simply the ID to the server, but I should pass a complex object with different properties and values.. Here the code I am...

Java : JsonPareser contains no data

java,json,rest,get
I am working on a Java application in which I am trying to get data from a Spring-MVC based server and currently system.out it, but I am getting ouput as token is null. I printed out the code which is being sent from the server, it is correct. I don't...

HTML href - how to not rewrite GET parametrs

html,get,href
I'm developing a webpage and I ran into little trubble. There is a list of users where I need to paginate by ?page=5, but also I need to search. But I can't figure how to set href to do from users/list?search=test&ST=on&PA=on&TE=on -> users/list?search=test&ST=on&PA=on&TE=on&page=5 Can somebody helps me? Thanks, before. CODE:...

PHP / JavaScript: How to pass variable from one page to another

javascript,php,jquery,variables,get
I am new to PHP and hope someone can help me with this. I have a page (index.php) where users can select a language. If no language is selected than the page URL is just index.php which defaults to English. If they select a language than the page gets reload...

$_get and file_get_contents don't work together [duplicate]

php,get
This question already has an answer here: PHP Parse/Syntax Errors; and How to solve them? 10 answers I have a PHP script that basically tries to convert the string it gets from: https://camwijs.nl/system/avatarimage.aspx?username= to https://www.habbo.com/habbo-imaging/avatarimage?figure= If I run the code it just gives me an page with the error...

Executable has more data to send, but don't know how to signal the executable that data already sent has been processed and ready for next block

php,mysql,function,url,get
all This is my first question ever here, so please, if I make a mistake, let me know. I want to learn all I can. With that being said, here is my dilemma. I am trying to modify some php so that a program used with Microsoft Flight Simulator to...

why istream::get sets failbit and eofbit together?

c++,get,eof,istream
I wonder why istream::get sets failbit and eofbit together. The behaviour of std::getline is different: it sets eofbit when it encounters the end of the file, and failbit when you try to read past the end of the file. So you can write: while (std::getline(is, s) { blablabla... // gets...

Remember which view you came from after you do a POST on current view

django,forms,redirect,web,get
I know that it is possible to know which view you came from using a GET parameter. Ref: Django Redirect to previous view. However, if you do a POST on the current view, this information gets wiped. For my purpose I have a django application where you can get to...

Django serve get-requests

django,get,nested-attributes
Hey guys I am a bit new in Django. What I want to achieve is a URL which I can access with a GET request from my app, passing some values along with it. I have a UserProfile model in Django which has a oneToOneField relationship to User. I want...

GET Request is waiting before sent in firefox

http,firefox,express,get
I'm working on a Node/Express webApp which take a lot of dependency client side. I was analyzing all the packet in the Network tab in firefox devtool and I saw something strange for me... Why is firefox waiting every 6 request to send 6 new ? All of theses request...

waiting in the main code while asynchronous call for get method executes

c#,asynchronous,callback,get
void main() { OpenWeatherApiClient.getCurrentLocationWeatherAsync(55.513434, -37.53434, (x) => { Console.WriteLine(x.coord.lat); Console.ReadLine(); }); } Console.WriteLine("this should happen before"); /// I want to hold the the function here till the call back returns and executes the above logic /// the asynchronous function public static void getCurrentLocationWeatherAsync(double latitude, double longitude, Action<WeatherData> callback) { //weather...

PHP magic method __get and [] make value disappear

php,arrays,properties,get
I've faced one interesting problem. Creating an array property and assigning a value into it in the same operation using [] seems to go wrong. class T { public function __get($property) { if (!isset($this->{$property})) { $this->{$property} = array(); } return $this->{$property}; } public function __set($key, $val) { $this->{$key} = $val;...

Customizing GET Response Using Python Requests Module

python,oauth,get,python-requests
I'm a newbie to Python here, so bear with me... Trying to experiment making a simple oAuth call to Instagram API. After you register your application, you get your client ID, client secret, etc, the first step in the oAuth process is to direct the user to this authorization URL:...

How to Convert get LIST from MVC for using as Json

c#,json,asp.net-mvc,post,get
I try to Get Data from MVC controller as JSON but it appear that it submit to me like an LIST and i can't use a json object i recieve. except from using stringify. But i really need some part of it not the all object. Controller*** public class testController...

Error on GET request to steam market

angularjs,node.js,express,get,jsonp
I am attempting to do a GET request to get the item price info for a single item on the steam market. Here is the exact angularJS script I am using: <script> var app = angular.module('csgo', []); app.controller('MainCtrl', function($scope, $http) { $http.jsonp("http://steamcommunity.com/market/priceoverview/?currency=3&appid=730&market_hash_name=StatTrak%E2%84%A2%20P250%20%7C%20Steel%20Disruption%20%28Factory%20New%29").success(function(response) { $scope.values = response; console.log(response); }); }); </script>...

Some Form Inputs didn't sent via GET / POST [duplicate]

php,html,post,get
This question already has an answer here: Disabled form inputs do not appear in request 4 answers Here is My Update Item.php <!DOCTYPE html> <html lang="en"> <head> <style type="text/css"> input[type='text'],input[type='number'],input[type='date']{ color:#0000FF; background-color:#FFFFCC; } </style> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta...

php- get postback from a hyperlink

php,html,post,hyperlink,get
I have a HTML form in which I'm having the following hyperlink: <a href="" id="WhatsNew">What's New</a></li> I want to get a postback from this hyperlink, in order to execute the following PHP code: if($_POST['WhatsNew'] == "Y") { echo "HELLO USER"; } How can I do so?...

method=“GET” gives empty $_GET, method=“POST” gives non empty $_GET. Why? (PHP 5.6.6)

php,forms,post,get,submit
test.php: <?php var_dump($_GET); var_dump($_POST); submit_get.php: <form action="test.php?param=some" method="GET"> <input type="submit" value="Submit"> </form> submit_post.php: <form action="test.php?param=some" method="POST"> <input type="submit" value="Submit"> </form> Submitting submit_get.php gives something like this: array (size=0) empty array (size=0) empty Submitting submit_post.php outputs something like this: array (size=1) 'param' => string 'some' (length=4) array (size=0) empty So, I...

Python - sending http requests as strings

python,http,get
How can I send HTTP requests as string with python? something like this: r = """GET /hello.htm HTTP/1.1 User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT) Host: www.stackoverflow.com Accept-Language: en-us Accept-Encoding: gzip, deflate Connection: Keep-Alive""" answer = send(r) print answer # gives me the response as string ...

PHP : How to set array Value with $_GET

php,url,get,value
i tried to set the value of the $_GET[] into an array object this is my code $X=array( 'status_1'=>'"'.$_GET['hasil_1'].'"', 'status_2'=>'"'.$_GET['hasil_2'].'"', 'status_3'=>'"'.$_GET['hasil_3'].'"', . . 'status_17'=>'"'.$_GET['hasil_17'].'"'); //Faktor Klasifikasi $n = 'derajat'; //nama tabel $table='tabel'; classify($X,$n,$table); it's not working . this is the url...

magic __get() on end($array) or $var

php,arrays,get
I want to access the last element of an array via php's magic __get method. I am using php's end($array) to return. If I do something like this: class fun { protected $var = 'test'; protected $arr = array(1, 2); public function __get($name) { return $this->$name; } public function get_array()...

In WordPress how do I pass multiple variables into the URL and retrieve them?

javascript,php,wordpress,url,get
For some reason I can only retriever the first variable, in this instance, "product_category" out of the URL http://localhost/coffeesite/?product_category=coffee&brand=bourbon . I'm outputting javascript to confirm that I've set the variable, but again, only coffee will be alerted, and not brand. I'm using WordPress's 'get_query_var'. See code below: <?php echo '<script>...

confusing syntax of cin.get()

c++,get,delimiter
I read a book which mentions that cin.get() will keep delimiter in the input stream, thus, the result of a following consecutive calling with the same delimiter is an empty line. So I wrote the following code to test this property and other. #include <iostream> using namespace std; int main()...

What is the ideal way to send a date parameter over a GET request in Play Framework?

java,javascript,datetime,playframework,get
I am new to Play Framework. I am able to send simple data types like string, integer etc directly via the request and access them in the Back end Java method. When I try doing this in the route file, GET /food/fetchMealInfo/:noOfDays/:dateSelected controllers.trackandplan.FoodController.fetchMealInfo(noOfDays : Integer, dateSelected : Date) I am...

$_POST and $_GET

post,get
I am trying to make all $_GET methods into $_POST on this page. I want php?produktid=0 to be invisible on the adress bar. How can I solve this? This is an application and I want it to run on its own. //PREVIOUS BUTTON $index = $_GET['produktid']; echo "<td>"; if ($index...

jQuery $.get not working (Not Found 404)

javascript,jquery,ajax,get,ip
Please help me with a problem - get function not working for http://wtfismyip.com/text or http://www.passwordrandom.com/query?command=ip Code: <span id="global_ip" class="global_ip">global ip - get test</span> <script type="text/javascript"> $('#global_ip').click(function () { alert('click!'); $.get({ type: "GET", url: "http://www.passwordrandom.com/query?command=ip", dataType: "text" }).done(function (res) { alert(res); }).fail(function (jqXHR, textStatus, errorThrown) { alert("Call failed: " + textStatus...

Serving content dynamically using the directory parameter for GET requests - shelf package dart

get,dart,dart-shelf
The code snippets below come from a server serving a get request Server snippets 1) io.serve(handler, InternetAddress.LOOPBACK_IP_V4, 8080).then((server) { print('Listening on port 8080'); }).catchError((error) => print(error)); 2) Router routes = new Router() ..get('/newest', handler.handleNewest) ..get('/anonymous', handler.handleAnonymousGetRequest) ..post('/anonymous', handler.handleAnonymousPostRequest); 3) shelf.Response handleNewest(shelf.Request request){ print('got request for newest'); return new shelf.Response.ok('sample content...

Getting the variables for DesktopLauncher using Libgdx

java,nullpointerexception,get,libgdx
I am trying to create a 2d game and right now I need the games width. I tried to use Gdx.graphics.getWidth() but that gives me a nullpointer. After searching through the web I came upon this http://www.badlogicgames.com/forum/viewtopic.php?f=15&t=13984 That is the explanation but as you can see in my code I...

Socket.io AngularJS Error 403 - Forbidden

angularjs,get,socket.io,chat,http-status-code-403
I have an App on AngularJS but when I try to integrate Socket.io to a Chat, it gave me a problem... so here it is: GET http://localhost:2772/socket.io/?EIO=3&transport=polling&t=1433165408651-0 403 (Forbidden) Its on socket.io-1.3.5.js library An the principal error its here xhr.send(this.data)}catch(e){... Anyone knows what is the problem?...