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

parse_url problems with long url

I have a site that is using parse_url in this command:
<?php $domain = parse_url($row['buyfrom'], PHP_URL_HOST); ?>
buyfrom is a url and in this case the specific url I having difficulty with is very long:

http://www.target.com/Corningware-SimplyLite-10-pc-Casserole-Set/dp/B001A40S98/ref=sr_1_2?ie=UTF8&searchView=grid5&qid=1275771178 &frombrowse=0&fromGsearch=true&node=1038576|128799 1011&keywords=corningware%2010&searchSize=30&id=Co rningware%20SimplyLite%2010-pc%20Casserole%20Set&searchBinNameList=purchasing_ channel,subjectbin,price,target_com_primary_color-bin,target_com_size-bin,target_com_brand-bin&searchNodeID=1038576|1287991011&searchRank=tar get104545&sr=1-2&searchPage=1&rh=

I'm getting all kinds of errors. Is there a way to fix this command so that it can handle the long url like this one? I'm assuming the length of the URL is the issue.
Jun 5 '10 #1
1 1693
Atli
5,058 Expert 4TB
Hey.

What errors are you getting?
Jun 6 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Sven Dzepina | last post by:
Hello, How I can realize that? I have this code: <?php $url = "http://www.URL.com; $content = file($url); foreach($content as $line){ $pattern =
13
by: deko | last post by:
I'm trying to identify which named anchor is currently being viewed on a page. Although the address bar of my browser shows #whatever appended to the end of the url, I can't seem to find it in a...
9
by: Ted G | last post by:
Hello, I'm new wiyh PHP and would like to ask, what is the common way to check if directory path e.g. in url and file requested are in proper format? E.g. if I would give my homepage URL in...
0
by: Arjan van den Noort | last post by:
How to delete a directory (with all containing directories and files) with vb.net if the directory contains long paths ? (just like the dos command: RD /S/Q path) What I want is a routine to...
4
by: Tim Streater | last post by:
I have a page which I enter thusly: http://my.domain/mypage.phtml?absid=123&cpage=somestring and inside mypage.phtml I do this: $absid = $_GET; Unfortunately, and I can't easily fix this...
2
by: Mike | last post by:
Hi, I am new to C and having problems with the following program. Basically I am trying to read some files, loading data structures into memory for latter searching. I am trying to use structres...
4
by: deko | last post by:
Why does this code fail? $ref = http://example.com/?p=32 $ref_a = parse_url($ref); echo ref_a; //returns nothing Does the '?' cause parse_url to fail? I'm trying to capture a referrer in...
73
by: Yevgen Muntyan | last post by:
Hey, I was reading C99 Rationale, and it has the following two QUIET CHANGE paragraphs: 6.5.3.4: "With the introduction of the long long and extended integer types, the sizeof operator may...
10
by: Old Wolf | last post by:
Consider the following program: #include <stdio.h> int main(void) { /* using malloc to eliminate alignment worries */ unsigned long *p = malloc( sizeof *p ); if ( p && sizeof(long) ==...
3
by: a2rodger | last post by:
I am using the following function and parse_url() to attempt to grab the subdomain from my sites url function selfURL() { $s = empty($_SERVER) ? '' : ($_SERVER == "on") ? "s" : ""; $protocol =...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
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
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...

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.