473,396 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Changes between some lines

I have some files with urls and the only change between the urls is
the id, which stands as an argument but how can I see the id it in the
easist way?
Dec 25 '07 #1
3 1038
On Dec 25, 8:09 pm, The87Boy <the87...@gmail.comwrote:
I have some files with urls and the only change between the urls is
the id, which stands as an argument
As an argument in the url, as you e.g. can see on this url:
http://localhost/index.php?cmd=14&id=3325253&from=2
but how can I see the id it in the easist way?
Dec 25 '07 #2
On Tue, 25 Dec 2007 20:21:38 +0100, The87Boy <th******@gmail.comwrote:
On Dec 25, 8:09 pm, The87Boy <the87...@gmail.comwrote:
>I have some files with urls and the only change between the urls is
the id, which stands as an argument

As an argument in the url, as you e.g. can see on this url:
http://localhost/index.php?cmd=14&id=3325253&from=2
>but how can I see the id it in the easist way?
In the request itself:
$_GET['id']

Parsing the url as a string in another file (if you'd like to examine the
target in another script for instance):
$id = false;
$url = 'http://localhost/index.php?cmd=14&id=3325253&from=2';
$querystring = parse_url($url, PHP_URL_QUERY);
if(!empty($querystring)){
parse_str($querystring,$array);
$id = isset($array['id']) ? $array['id'] : false;
}
--
Rik Wasmus
Dec 27 '07 #3
On Dec 27, 6:06 pm, "Rik Wasmus" <luiheidsgoe...@hotmail.comwrote:
In the request itself:
$_GET['id']
I already know this one, but it is possible, it is not localhost, and
there why I can not use this one
Parsing the url as a string in another file (if you'd like to examine the
target in another script for instance):
$id = false;
$url = 'http://localhost/index.php?cmd=14&id=3325253&from=2';
$querystring = parse_url($url, PHP_URL_QUERY);
if(!empty($querystring)){
parse_str($querystring,$array);
$id = isset($array['id']) ? $array['id'] : false;}
This was actually what I was searching for, but I did not know, there
was a PHP function, there why my question
Dec 28 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Robert | last post by:
I have an application with custom configuration sections in it's app.config file. Here's a shortened excerpt: <monitors> <monitor...
4
by: Glenn Owens | last post by:
I have a DataGrid web control which I've dynamically populated with template columns to be used for bulk-editting. Generally, all of the columns are textbox and/or dropdownlist child controls. ...
2
by: Simon Harvey | last post by:
Hi all, Is there any easy way to check a field for calues that have changed on a post back. So the page is sent to the user, the user changes some values and I need to know which ones...
9
by: Tim D | last post by:
Hi, I originally posted this as a reply to a rather old thread in dotnet.framework.general and didn't get any response. I thought it might be more relevant here; anyone got any ideas? My...
8
by: Shimon Sim | last post by:
Hi I converted my existing ASP.NET project to VS.NET 2005. Build gives me some warnings about config file. I have custom section definition in web.config. Were there any changes in this for...
2
by: Mike | last post by:
Hi, I am strugling with a simple problem which I can't seem to resolve. I have an asp.net page which contains a server-control (flytreeview, which is a kind of a tree to be exact). The tree is...
335
by: extrudedaluminiu | last post by:
Hi, Is there any group in the manner of the C++ Boost group that works on the evolution of the C language? Or is there any group that performs an equivalent function? Thanks, -vs
2
by: Brian Hoops | last post by:
I have a windows forms datagrid and I would like to be able to recognize when changes have been made in order to perform the update. I tried the following, which works well, but only if the user...
4
by: ARC | last post by:
Hello all, I didn't use to have this problem in Access 97, but in 2007 (and maybe other versions of access after 97), if you have a form that has a subform, and you click the close button, you...
2
by: =?Utf-8?B?cmF1bGF2aQ==?= | last post by:
c# vs 2008 what's the best way... need to apply changes to some methods in many source files (C#.cs). (Pseudocode) here is how is done manually: 1. open the source (thisClass.cs) 2....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.