php api - chopping off querystring parameter after '&' symbol?

Active3 hr before
Viewed126 times

5 Answers


I am trying to shorten a url using the PHP API from bitly. The url I am trying to shorten contains a url in the GET parameters. , that does bring me to the literal url but im still getting a 403 error. If I go to the same url without the 'i' parameter everything works fine. I think it's because the slashes in the image link are not encoded. My problem is that I can not figure out how to encode them. – Timmy Knezevich Jul 7 '14 at 0:30 , Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers ,When I send the link with no encoding at all it returns the link without parameters again. When I send the link with urlencode() on the entire link it returns the literal version of the link again resulting in a 403 error. So that's 4 different ways of trying to encode the link none of which lead me to the correct link.

You need to use "%26" instead of ampersand (&).

http: //
load more v

This function is not meant to validate the given URL, it only breaks it up into the above listed parts. Partial and invalid URLs are also accepted, parse_url() tries its best to parse them correctly. , On seriously malformed URLs, parse_url() may return false. ,parse_str() - Parses the string into variables,parse_url — Parse a URL and return its components

http: // → query = null, fragment = null
   http: // → query = "",   fragment = null
   http: // → query = null, fragment = ""
   http: // → query = "",   fragment = ""
load more v

UTM parameters are part of the URL query string that are added by the UTM generator. The query string is the part of the URL that comes after the “?”  It contains variables that are used by dynamic web applications to track user behavior, pass specific information, or tell the web page what action to perform.,The biggest weakness of URLs made by the UTM code generator is that they’re long. Way too long. Adding one of these links to an SMS message or an offline advertisement is impossible.,Below your new campaign URL that was generated by the UTM link builder is a button to convert your URL to a Short Link (authorization required just means you need to approve Google to use your Bitly account):,Once you have granted Google permissions to your Bitly account, you are returned to the URL Builder with the shortened link:



load more v

Q_EED can be used as a URL parameter to pass obfuscated (or Base64 encoded) embedded data parameters. One of the most common use cases is to pass JSON data in a binary format through a URL.,Q_PopulateResponse is used as a URL parameter to pre-populate survey responses.,Data can be passed into a survey using a query string. Once passed, the data can be saved as embedded data with the survey response. At the end of a survey, query strings can be used to pass data to another website or survey.,Below are some common Qualtrics use cases that use query strings. Visit the linked pages for more information.

Query strings follow a very specific syntax. They are added to the end of a URL in the general format of ?FieldName=FieldValue. The FieldName is the name of your data field while FieldValue is the specific data value of your field. Let’s take a look at an example URL with a query string appended to it. The query string is in bold.

https: //

Query strings allow you to pass multiple pieces of data all within one single URL. However, when your URL contains multiple query strings, the syntax is a bit different. Let’s take a look at a URL with multiple query strings appended to it. The query strings are in bold.

https: //

For example, if you pass the following query string:

https: //
load more v

The Mailchimp Marketing API accepts the standard HTTP methods: GET, POST, PATCH, PUT, and DELETE.,Make a DELETE request to remove a resource.,Make a GET request to retrieve data. GET requests will never cause an update or change to your data because they’re safe and idempotent.,Mailchimp Marketing API

  • Make a GET request to retrieve data. GET requests will never cause an update or change to your data because they’re safe and idempotent.

  • Use a POST request to create new resources. For example, make a POST request to a collection endpoint where the body of your request JSON contains all of the required information about the new object to be added to the collection.

  • Make a PATCH request to update a resource. With PATCH requests, you only need to provide the data you want to change.

  • Use a PUT request to create or update a resource. This is most useful for syncing contact data.

  • Make a DELETE request to remove a resource.

Some endpoints act on resources outside of a traditional REST approach. To pause an automation workflow, for example, you make a POST request to /automations/{workflow_id}/emails/{id}/actions/pause. Where we deviate from the verb usage defined by REST, we namespace those verbs under actions in the URI.

/automations/ {
/emails/ {
load more v

Other "undefined-undefined" queries related to " php api - chopping off querystring parameter after '&' symbol?"