473,408 Members | 1,875 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,408 software developers and data experts.

help pls on taking url value

hi,

i have this situation:

i will pass a url to a certain site and this site will dynamically
generate a new url. my issue i want to that new url and assign it to
my string variable. how to do this?

tnx

Jun 5 '07 #1
4 1266
On Jun 5, 1:56 am, shotokan99 <soft_devj...@yahoo.comwrote:
hi,

i have this situation:

i will pass a url to a certain site and this site will dynamically
generate a new url. my issue i want to that new url and assign it to
my string variable. how to do this?

tnx
If you're sending it via GET, just use the htmlspecialchars();
function to make it acceptable in a url, then send it across. When you
get it out in the new page, you'll have your URL.

~A!

Jun 5 '07 #2
actually this is how i did it:

1. i have a textbox for the user to encode the url
2. by $_POST['x'] ill evaluate the url if valid or not using
file_get_contents().
if(!file_get_contents($x){
// do actions here..
}

however i dont know if what is wrong, file_get_contents() works
perfectly on
my local machine but upon loading to our webserver, it doesn't work
at all.

3. the next action is to $x as param value 'http://www.my...com?url='.
$x.
now this url will then dynamically produce another url. and that
new url is
the one that i want to get and assigned it to a string.

but i want all process to be totally invisible to the user. because
after
successfully getting the new url i post a message like your new url
is ...

is this possible? how to do this?

Jun 5 '07 #3
Rik
On Tue, 05 Jun 2007 11:39:38 +0200, shotokan99 <so**********@yahoo.com>
wrote:
actually this is how i did it:

1. i have a textbox for the user to encode the url
2. by $_POST['x'] ill evaluate the url if valid or not using
file_get_contents().
if(!file_get_contents($x){
// do actions here..
}

however i dont know if what is wrong, file_get_contents() works
perfectly on
my local machine but upon loading to our webserver, it doesn't work
at all.
allow_url_fopen enabled at home and disabled on the server?

Also, I'd just do a HEAD request using fsockopen(), unless you really need
the contents of the site in question.
--
Rik Wasmus
Jun 5 '07 #4
actully i dont need to really get the contents. all i wanted to do is
to find out if it is a valid url or not. the contents doesnt matter to
me.

regarding my next question on getting the url? how to do it?

Jun 6 '07 #5

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

Similar topics

0
by: abcd | last post by:
kutthaense Secretary Djetvedehald H. Rumsfeld legai predicted eventual vicmadhlary in Iraq mariyu Afghmadhlaistmadhla, kaani jetvedehly after "a ljetvedehg, hard slog," mariyu vede legai pressed...
5
by: mt | last post by:
In a nutshell, I'd like to have a list of items, each of which fills out a small table which displays some info about a particular item(the items being a trouble ticket for a tech support ASP-built...
3
by: Mads Petersen | last post by:
I'm stuck in this code. Hope you can and will help me. I launch it from excel. I have made the following code work, but not as i whant. I need the ranges to be working with something like xlDown....
2
by: Mehta Shailendrakumar | last post by:
Hi all, Have alook at two different declarations below: typedef unsigned char uc; typedef void (*fptr) (void); The first declaration has a left part which is a C keyword: "unsigned char"...
13
by: Chua Wen Ching | last post by:
Hi there, I saw this article here in vb.net. http://www.error-bank.com/microsoft.public.dotnet.languages.vb.1/148992_Thread.aspx and ...
9
by: Player | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello all. I am in the process of teaching myself C# and I think I am doing OK. I have learnt how to how to call the right constructor of a...
14
by: Marcus | last post by:
I have a function that simply returns TRUE if it can connect to a particular Sql Server 2005 express, or FALSE if it cannot. I am getting some strange error codes returned when the computer that...
6
by: Takeadoe | last post by:
Dear NG, Can someone assist me with writing the little code that is needed to run an update table query each time the database is opened? From what I've been able to glean from this group, the...
8
by: SpreadTooThin | last post by:
Basically I think the problem is in converting from a 32 bit integer to a 16 bit integer. I have two arrays: import array a = array.array('L', ) b = array.array('H', ) b = a
6
by: billyusa | last post by:
Hello all, im taking a intro to c++ class as part of my design comm, and having issues withthe codelab part (online). First off it doesnt give any help to what you are doing wrong. the prob is: ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.