I tried this:
$urlToFetch = 'http://abc.go.com';
$ch = curl_init($urlToFetch);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, false);
$contents = curl_exec($ch);
echo $contents;
which worked, echoing the page contents, but other urls didn't work. Clickbank affiliate urls did not work - for...
Article directories such as ezine, prohibit direct links to affiliate pages from articles, unless you redirect to an aff page from your own domain. So if I link to www.mydomain.com from the article and then redirect the user to the affilaite page, that is okay - they will allow that. But I...
This script works nicely for files I host myself, and I am using it.
I would like to expand its use to include URLs hosted elsewhere if possible - can that be done?
So, say I want to have my affiliate offer page appear to a user and retain my root domain in the address bar - can I do that...
Is this what you meant me do?
<?php
session_start();
$id = $_GET["id"];
if (!(isset($_SESSION['id']))){
$_SESSION['id'] = $id;
header("location:http://audiovoiceads.info");
}else{
$id = $_SESSION['id'];
$root_domain = $_SERVER['HTTP_HOST'];
$filename = "id_list.txt"; //...
It was the Ajaxy stuff that put me off :)
but will try your code as well.
Actually just trying my code with the domain.com straihgt into the address bar (or via a bookmark) and I am getting a Redirect Loop error.
I must have something wrong with my code.
This is my code attempt
<?php...
Thanks for all the input.
jpadie , thanks for that code but I have got this working without need for database. I wanted a simple portable solution and just use a text file to store the article page names etc.
I used a session as you origianlly suggested and it works a treat.
I will test...
The purpose of this script is simply to allow me to include links containing querysrings in my articles. Some article directories do not allow linking to sub domains or sub folders on your domain, so they won't allow www.site.com/folder/link.htm or sub.site.com for example. So all I am after...
Sessions are a good idea - I will play around with some code.
Whatever solution I (we) come up with, it has to be portable across different servers, and i don't want to use htaccess at all.
There may not be a php solution to this - but I will explain what I want to do first.
I want to be able to show a link in an article resource box that points to my root domain with a variable in the querystring - eg "www.site.com?id=123"
When clicked, my php script will $_GET["id"] the value...
Forget this thread
I loaded 27000 items into my table and populated a combo by querying the table when the page was loaded. It took 70 seconds to load on my server.
if user refreshes it takes another 70 seconds.
So that's it. I'll either have to live with the 70 second delay (which is too...
OK, let's say i use multi selects, as big bad dave suggests.
At moment we are only talking UK, so we only need 2 tables... town and county.
The user needs to select a town OR a county to include as search criteria.
If he chooses town, I'll need to query the town table and fill the combo, same...
Hard coding it is going to take time. I've never seen more than a few hundres items in a list at once (usually a list of countries) Hard coding 20000 items ( a list of towns in UK) is going to be time consuming and I'm concerned about the time the page would take to load.
Filling from a...
I use php/mysql.
I would like your thoughts on the best way to populate an html form SELECT drop down list which will contain around 20,000 items.
Hard coding them into the html, or calling them from a database?
Thing is, once they've been called from the database, and appear in the combo...
i have a PHP search page with several text fields, surname, email,phone as an example. the user fills one or all in and clicks search button. The data is POSTed to a result.php page.
Here i need to validate what has bbeen completed, and build the query depending on which fields have been...
i am having problems displaying search results from a mysql database in blocks of 20 or so using prev and next links. I have read through old posts and got some sample code which worked in a test file, but not in my code..
I have copied some example code from my pages here with comments in to...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.